Documentation ¶
Index ¶
- type After
- type Async
- type Before
- type Client
- 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
- type Middle
- type RouteHandler
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Async ¶
type Async struct {
// contains filtered or unexported fields
}
func (*Async) ProtoBufEmit ¶
type Client ¶
type Client struct { Name string Addr string Conn *Conn HeartBeatTimeout time.Duration HeartBeatInterval time.Duration ReconnectInterval time.Duration HeartBeat func(c *Client) error ReadBufferSize int WriteBufferSize int DailTimeout time.Duration OnOpen func(client *Client) OnClose func(client *Client) OnMessage func(client *Client, msg []byte) OnError func(err error) OnSuccess func() OnReconnecting 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 // contains filtered or unexported fields }
func (*Client) ProtoBufEmit ¶
func (c *Client) ProtoBufEmit(pack socket.ProtoBufPack) error
func (*Client) RemoteAddr ¶
type Conn ¶
func (*Conn) RemoteAddr ¶
type RouteHandler ¶
type RouteHandler struct {
// contains filtered or unexported fields
}
func (*RouteHandler) Remove ¶
func (rh *RouteHandler) Remove(path ...string)
func (*RouteHandler) Route ¶
func (rh *RouteHandler) Route(path ...string) *route
type Router ¶
type Router struct { StrictMode bool // contains filtered or unexported fields }
func (*Router) GetAllRouters ¶
func (r *Router) GetAllRouters() []*node
func (*Router) SetGlobalAfter ¶
func (*Router) SetGlobalBefore ¶
Click to show internal directories.
Click to hide internal directories.