Versions in this module Expand all Collapse all v2 v2.0.0 Mar 20, 2022 Changes in this version + type After func(client *Client, stream *socket.Stream) error + type Async struct + func (a *Async) Emit(pack socket.Pack) (*socket.Stream, error) + func (a *Async) JsonEmit(pack socket.JsonPack) (*socket.Stream, error) + func (a *Async) ProtoBufEmit(pack socket.ProtoBufPack) (*socket.Stream, error) + type Before func(client *Client, stream *socket.Stream) error + type Client struct + Addr string + Conn *Conn + DailTimeout time.Duration + HeartBeat func(c *Client) error + HeartBeatInterval time.Duration + HeartBeatTimeout time.Duration + Name string + OnClose func(client *Client) + OnError func(err error) + OnMessage func(client *Client, msg []byte) + OnOpen func(client *Client) + OnReconnecting func() + OnSuccess func() + OnUnknown func(client *Client, message []byte, next Middle) + PingHandler func(client *Client) func(appData string) error + PongHandler func(client *Client) func(appData string) error + Protocol tcp.Protocol + ReadBufferSize int + ReconnectInterval time.Duration + WriteBufferSize int + func (c *Client) Async() *Async + func (c *Client) Close() error + func (c *Client) Connect() + func (c *Client) Emit(pack socket.Pack) error + func (c *Client) GetRouter() *Router + func (c *Client) JsonEmit(pack socket.JsonPack) error + func (c *Client) LocalAddr() net.Addr + func (c *Client) Ping() error + func (c *Client) Pong() error + func (c *Client) ProtoBufEmit(pack socket.ProtoBufPack) error + func (c *Client) Push(message []byte) error + func (c *Client) RemoteAddr() net.Addr + func (c *Client) SetRouter(router *Router) *Client + func (c *Client) Use(middle ...func(Middle) Middle) + type Conn struct + Conn net.Conn + LastPong time.Time + func (c *Conn) Close() error + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) Read(b []byte) (n int, err error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) Write(message []byte) error + type Middle func(client *Client, stream *socket.Stream) + type RouteHandler struct + func (rh *RouteHandler) Remove(path ...string) + func (rh *RouteHandler) Route(path ...string) *route + type Router struct + StrictMode bool + func (r *Router) GetAllRouters() []*node + func (r *Router) Group(path ...string) *group + func (r *Router) Remove(path ...string) + func (r *Router) Route(path ...string) *route + func (r *Router) SetGlobalAfter(after ...After) + func (r *Router) SetGlobalBefore(before ...Before) Other modules containing this package github.com/lemoyxk/kitty