From b962e27a59c8fe49c95c6515577ce89898d9ae65 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 2 Jul 2019 01:06:59 -0400 Subject: update API --- test_msgnet/main.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test_msgnet') diff --git a/test_msgnet/main.go b/test_msgnet/main.go index 5b31c2c..e35212f 100644 --- a/test_msgnet/main.go +++ b/test_msgnet/main.go @@ -102,8 +102,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 true } @@ -131,7 +130,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 } @@ -139,8 +138,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", aliceAddr, bobAddr) bob = genMyNet(ec, "bob", bobAddr, aliceAddr) -- cgit v1.2.3-70-g09d2