diff --git a/server.go b/server.go index cd1c3fe..346cd08 100644 --- a/server.go +++ b/server.go @@ -23,7 +23,7 @@ func New(sh ServerHandler) Server { s := &server{ sh: sh, } - s.ctx = NewServerContext() + s.ctx = newServerContext() return s } diff --git a/server_context.go b/server_context.go index c7c606e..8c66fcc 100644 --- a/server_context.go +++ b/server_context.go @@ -12,7 +12,7 @@ type serverContext struct { cuc.Context } -func NewServerContext() ServerContext { +func newServerContext() ServerContext { sCTX := &serverContext{} sCTX.Context = cuc.NewContext(nil) diff --git a/socket.go b/socket.go index 5b6aa83..eedfcc4 100644 --- a/socket.go +++ b/socket.go @@ -156,7 +156,7 @@ func newSocket(serverCTX ServerContext, id string, conn *websocket.Conn, sh Sock if 0 < sh.GetReadTimeout() { s.SetReadDeadline(time.Now().Add(sh.GetReadTimeout() * time.Second)) } - s.ctx = NewSocketContext(serverCTX) + s.ctx = newSocketContext(serverCTX) return s } diff --git a/socket_context.go b/socket_context.go index fe997a3..f0b32ab 100644 --- a/socket_context.go +++ b/socket_context.go @@ -9,7 +9,7 @@ type SocketContext interface { ServerContext() ServerContext } -func NewSocketContext(serverCTX ServerContext) SocketContext { +func newSocketContext(serverCTX ServerContext) SocketContext { sCTX := &socketContext{} sCTX.Context = cuc.NewContext(serverCTX) sCTX.serverCTX = serverCTX