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

Merge branch 'RestConnect' into 'release'

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

See merge request !266
parents 6e8960ce db26c9e2
No related branches found
No related tags found
2 merge requests!510Release,!266Add & expose connect.ConnectionServer to restlike's connection server object
...@@ -18,12 +18,14 @@ import ( ...@@ -18,12 +18,14 @@ import (
type Server struct { type Server struct {
receptionId *id.ID receptionId *id.ID
endpoints *restlike.Endpoints endpoints *restlike.Endpoints
ConnectServer *connect.ConnectionServer
} }
// NewServer builds a RestServer with connect.Connection and // NewServer builds a RestServer with connect.Connection and
// the provided arguments, then registers necessary external services // the provided arguments, then registers necessary external services
func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix, func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix,
p xxdk.E2EParams, clParams connect.ConnectionListParams) (*Server, error) { p xxdk.E2EParams, clParams connect.ConnectionListParams) (*Server, error) {
var err error
newServer := &Server{ newServer := &Server{
receptionId: identity.ID, receptionId: identity.ID,
endpoints: restlike.NewEndpoints(), endpoints: restlike.NewEndpoints(),
...@@ -36,7 +38,7 @@ func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix, ...@@ -36,7 +38,7 @@ func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix,
} }
// Build the connection listener // 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 { if err != nil {
return nil, err return nil, err
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment