diff options
author | Determinant <[email protected]> | 2019-07-02 01:06:59 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-07-02 01:06:59 -0400 |
commit | b962e27a59c8fe49c95c6515577ce89898d9ae65 (patch) | |
tree | 993fabfb4299b3668c7933ea33f08bc85ca0af6b /test_msgnet | |
parent | bbe214128b6f7cb4e57fcda7adc3205ec9ec66cb (diff) |
update API
Diffstat (limited to 'test_msgnet')
-rw-r--r-- | test_msgnet/main.go | 9 |
1 files changed, 4 insertions, 5 deletions
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) |