This commit is contained in:
crusader 2017-08-25 18:57:18 +09:00
parent 46d442f2c2
commit 3fdde4c8f2

View File

@ -36,9 +36,13 @@ type server struct {
func NewServer(o *ServerOptions) Server {
s := &server{
_option: o.Validate(),
_handlers: make(map[string]*SocketOptions, 1),
_sockets: make(map[string]Socket, 100),
_option: o.Validate(),
_handlers: make(map[string]*SocketOptions, 1),
_sockets: make(map[string]Socket, 100),
_addSocketCh: make(chan Socket),
_removeSocketCh: make(chan Socket),
_sendCh: make(chan sendRequest),
_sendAllCh: make(chan []byte),
}
s._upgrader = &websocket.Upgrader{