Versions in this module Expand all Collapse all v1 v1.1.7 Jun 10, 2020 v1.1.6 Jun 10, 2020 v1.1.5 Jun 9, 2020 v1.1.4 Jun 9, 2020 v1.1.3 Jun 8, 2020 v1.1.2 Jun 7, 2020 Changes in this version type Server + OnSuccess func() v1.1.1 Jun 7, 2020 Changes in this version + type After func(conn *WebSocket, receive *lemo.Receive) exception.Error + type Before func(conn *WebSocket, receive *lemo.Receive) (lemo.Context, exception.Error) type Router + func (router *Router) SetGlobalAfter(after ...After) + func (router *Router) SetGlobalBefore(before ...Before) type Server + IP string + Name string + func (socket *Server) LocalAddr() net.Addr v1.1.0 Jun 6, 2020 v1.0.9 Jun 6, 2020 Changes in this version + func SetAfter(after ...after) + func SetBefore(before ...before) + type Middle func(conn *WebSocket, receive *lemo.ReceivePackage) + type RouteHandler struct + func (handler *RouteHandler) Route(path string) *route + type Router struct + IgnoreCase bool + func (router *Router) GetAllRouters() []*node + func (router *Router) Group(path string) *group + func (router *Router) Route(path string) *route + type Server struct + AutoBind bool + CertFile string + CheckOrigin func(r *http.Request) bool + HandshakeTimeout int + HeartBeatInterval int + HeartBeatTimeout int + Host string + KeyFile string + OnClose func(conn *WebSocket) + OnError func(err exception.Error) + OnMessage func(conn *WebSocket, messageType int, msg []byte) + OnOpen func(conn *WebSocket) + Path string + PingHandler func(connection *WebSocket) func(appData string) error + PongHandler func(connection *WebSocket) func(appData string) error + Port int + Protocol websocket2.Protocol + ReadBufferSize int + TLS bool + WaitQueueSize int + WriteBufferSize int + func (socket *Server) CheckPath(p1 string, p2 string) bool + func (socket *Server) Close(fd uint32) error + func (socket *Server) Emit(fd uint32, event []byte, body []byte, dataType int, protoType int) error + func (socket *Server) EmitAll(event []byte, body []byte, dataType int, protoType int) (int, int) + func (socket *Server) GetConnection(fd uint32) (*WebSocket, bool) + func (socket *Server) GetConnections() chan *WebSocket + func (socket *Server) GetConnectionsCount() uint32 + func (socket *Server) GetRouter() *Router + func (socket *Server) Json(fd uint32, msg lemo.JsonPackage) exception.Error + func (socket *Server) JsonAll(msg lemo.JsonPackage) (int, int) + func (socket *Server) JsonEmit(fd uint32, msg lemo.JsonPackage) error + func (socket *Server) JsonEmitAll(msg lemo.JsonPackage) (int, int) + func (socket *Server) ProtoBufEmit(fd uint32, msg lemo.ProtoBufPackage) error + func (socket *Server) ProtoBufEmitAll(msg lemo.ProtoBufPackage) (int, int) + func (socket *Server) Push(fd uint32, messageType int, msg []byte) error + func (socket *Server) Ready() + func (socket *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (socket *Server) SetRouter(router *Router) *Server + func (socket *Server) Shutdown() + func (socket *Server) Start() + func (socket *Server) Use(middle ...func(next Middle) Middle) + type WebSocket struct + Conn *websocket.Conn + Context lemo.Context + FD uint32 + Request *http.Request + Response http.ResponseWriter + Server *Server + func (conn *WebSocket) ClientIP() string + func (conn *WebSocket) Close() error + func (conn *WebSocket) Emit(event []byte, body []byte, dataType int, protoType int) error + func (conn *WebSocket) Host() string + func (conn *WebSocket) Json(msg lemo.JsonPackage) exception.Error + func (conn *WebSocket) JsonEmit(msg lemo.JsonPackage) error + func (conn *WebSocket) ProtoBufEmit(msg lemo.ProtoBufPackage) error + func (conn *WebSocket) Push(messageType int, msg []byte) error