diff options
Diffstat (limited to 'test_msgnet_tls')
-rw-r--r-- | test_msgnet_tls/main.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test_msgnet_tls/main.go b/test_msgnet_tls/main.go index 78601a2..1b434b2 100644 --- a/test_msgnet_tls/main.go +++ b/test_msgnet_tls/main.go @@ -110,8 +110,7 @@ func connHandler(_conn *C.struct_msgnetwork_conn_t, connected C.bool, userdata u } } else { fmt.Printf("[%s] disconnected, retrying.\n", myName) - err := salticidae.NewError() - net.Connect(conn.GetAddr(), false, &err) + net.Connect(conn.GetAddr()) } return C.bool(res) } @@ -143,7 +142,7 @@ func genMyNet(ec salticidae.EventContext, n.net.Start() n.net.Listen(myAddr, &err); checkError(&err) - n.net.Connect(otherAddr, false, &err); checkError(&err) + n.net.Connect(otherAddr) return n } @@ -151,8 +150,8 @@ func main() { ec = salticidae.NewEventContext() err := salticidae.NewError() - aliceAddr := salticidae.NewAddrFromIPPortString("127.0.0.1:12345", &err) - bobAddr := salticidae.NewAddrFromIPPortString("127.0.0.1:12346", &err) + aliceAddr := salticidae.NewNetAddrFromIPPortString("127.0.0.1:12345", true, &err) + bobAddr := salticidae.NewNetAddrFromIPPortString("127.0.0.1:12346", true, &err) alice = genMyNet(ec, "alice", "ed5a9a8c7429dcb235a88244bc69d43d16b35008ce49736b27aaa3042a674043", aliceAddr, bobAddr) bob = genMyNet(ec, "bob", "ef3bea4e72f4d0e85da7643545312e2ff6dded5e176560bdffb1e53b1cef4896", bobAddr, aliceAddr) |