diff --git a/connectServer/README.md b/connectServer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1f35dc23982bf593935def6b5f60484f1578b9ef --- /dev/null +++ b/connectServer/README.md @@ -0,0 +1,2 @@ +# xxdk Connection Server Example + diff --git a/connectServer/main.go b/connectServer/main.go index 77819f529d3562586e87f842f1c7f524980c78d0..7a29d85f5c4246f8084983f557436da13150357f 100644 --- a/connectServer/main.go +++ b/connectServer/main.go @@ -115,11 +115,10 @@ func main() { // Start connection server---------------------------------------------------------- - // Start the connection server, which - e2eParams := xxdk.GetDefaultE2EParams() + // Start the connection server, which will allow clients to start connections with you connectionListParams := connect.DefaultConnectionListParams() _, err = connect.StartServer( - identity, cb, baseClient, e2eParams, connectionListParams) + identity, cb, baseClient, params, connectionListParams) if err != nil { jww.FATAL.Panicf("Unable to start connection server: %+v", err) } @@ -153,7 +152,7 @@ func main() { // Create a tracker channel to be notified of network changes connected := make(chan bool, 10) // Provide a callback that will be signalled when network health status changes - baseClient.GetCmix().AddHealthCallback( + e2eClient.GetCmix().AddHealthCallback( func(isConnected bool) { connected <- isConnected })