func newServer(dc string, nid string, elements []string, nrpc *proto.NatsRPC, getNodes func() map[string]discovery.Node) *Server {
	return &Server{
		dc:       dc,
		nid:      nid,
		nrpc:     nrpc,
		elements: elements,
		islb:     proto.ISLB(dc),
		getNodes: getNodes,
		rooms:    make(map[proto.SID]*room),
		closed:   make(chan bool),
	}
}
// newServer creates a new avp server instance
newServer creates a new avp server instance
// newServer creates a new avp server instance
func newServer(dc string, nid string, elements []string, nrpc *proto.NatsRPC, getNodes func() map[string]discovery.Node) *Server {
	return &Server{
		dc:       dc,
		nid:      nid,
		nrpc:     nrpc,
		elements: elements,
		islb:     proto.ISLB(dc),
		getNodes: getNodes,
		rooms:    make(map[proto.SID]*room),
		closed:   make(chan bool),
	}
}
func newServer ( dc string , nid string , elements [ ] string , nrpc * proto . NatsRPC , getNodes func ( ) map [ string ] discovery . Node ) * Server { return & Server { dc : dc , nid : nid , nrpc : nrpc , elements : elements , islb : proto . ISLB ( dc ) , getNodes : getNodes , rooms : make ( map [ proto . SID ] * room ) , closed : make ( chan bool ) , } }
newServer creates a new avp server instance
newServer creates a new avp server instance