Skip to content
Snippets Groups Projects
Commit db26c9e2 authored by Josh Brooks's avatar Josh Brooks
Browse files

Add & expose connect.ConnectionServer to restlike's connection server object

parent 6e8960ce
No related branches found
No related tags found
2 merge requests!510Release,!266Add & expose connect.ConnectionServer to restlike's connection server object
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment