From 30721918eb6b151ea3977aaa1aed7a20f2b513e3 Mon Sep 17 00:00:00 2001 From: Jono Wenger <jono@elixxir.io> Date: Wed, 6 Jul 2022 12:17:49 -0700 Subject: [PATCH] Minor fixes and add blank README --- connectServer/README.md | 2 ++ connectServer/main.go | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 connectServer/README.md diff --git a/connectServer/README.md b/connectServer/README.md new file mode 100644 index 0000000..1f35dc2 --- /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 77819f5..7a29d85 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 }) -- GitLab