From db26c9e22356b5bd2d77198fc97445ca0030e9f7 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Tue, 12 Jul 2022 15:01:36 -0700 Subject: [PATCH] Add & expose connect.ConnectionServer to restlike's connection server object --- restlike/connect/server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/restlike/connect/server.go b/restlike/connect/server.go index 9320d5e5c..7438b41d7 100644 --- a/restlike/connect/server.go +++ b/restlike/connect/server.go @@ -16,14 +16,16 @@ import ( // Server implements the RestServer interface using connect.Connection type Server struct { - receptionId *id.ID - endpoints *restlike.Endpoints + receptionId *id.ID + endpoints *restlike.Endpoints + ConnectServer *connect.ConnectionServer } // NewServer builds a RestServer with connect.Connection and // the provided arguments, then registers necessary external services func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix, p xxdk.E2EParams, clParams connect.ConnectionListParams) (*Server, error) { + var err error newServer := &Server{ receptionId: identity.ID, endpoints: restlike.NewEndpoints(), @@ -36,7 +38,7 @@ func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix, } // Build the connection listener - _, err := connect.StartServer(identity, cb, net, p, clParams) + newServer.ConnectServer, err = connect.StartServer(identity, cb, net, p, clParams) if err != nil { return nil, err } -- GitLab