Documentation ¶
Index ¶
- type Client
- func (c *Client) Activate(wsURL string, restURL string)
- func (c *Client) Close() error
- func (c *Client) GetID() string
- func (c *Client) GetKeepAlive() time.Duration
- func (c *Client) GetReadLimit() int64
- func (c *Client) GetTimeout() time.Duration
- func (c *Client) IsActive() bool
- func (c *Client) Receive() (*packet.Packet, error)
- func (c *Client) Send(p *packet.Packet) error
- func (c *Client) SetKeepAlive(ka time.Duration)
- func (c *Client) SetOnClose(callback func(t Transport, e error))
- func (*Client) SetReadLimit(limit int64)
- func (c *Client) SetTimeout(to time.Duration)
- type Handler
- func (h *Handler) Activate()
- func (h *Handler) Close() error
- func (h *Handler) GetID() string
- func (h *Handler) GetReadLimit() int64
- func (h *Handler) GetTimeout() time.Duration
- func (h *Handler) IsActive() bool
- func (h *Handler) Receive() (*packet.Packet, error)
- func (h *Handler) Send(p *packet.Packet) error
- func (h *Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (h *Handler) SetOnClose(callback func(t Transport, e error))
- func (h *Handler) SetReadLimit(limit int64)
- func (h *Handler) SetTimeout(to time.Duration)
- type ListenHandler
- func (l *ListenHandler) Activate()
- func (l *ListenHandler) Close() error
- func (l *ListenHandler) CloseTransports() error
- func (l *ListenHandler) GetReadLimit() int64
- func (l *ListenHandler) GetTimeout() time.Duration
- func (l *ListenHandler) IsActive() bool
- func (l *ListenHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (l *ListenHandler) SetOnAccept(callback func(l Listener, t Transport) Transport)
- func (l *ListenHandler) SetOnClose(callback func(t Transport, e error))
- func (l *ListenHandler) SetOnConnect(callback func(l Listener, t Transport))
- func (l *ListenHandler) SetReadLimit(limit int64)
- func (l *ListenHandler) SetTimeout(to time.Duration)
- type ListenWebsocket
- func (l *ListenWebsocket) Activate()
- func (l *ListenWebsocket) Close() error
- func (l *ListenWebsocket) CloseTransports() error
- func (l *ListenWebsocket) GetReadLimit() int64
- func (l *ListenWebsocket) GetTimeout() time.Duration
- func (l *ListenWebsocket) IsActive() bool
- func (l *ListenWebsocket) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (l *ListenWebsocket) SetOnAccept(callback func(l Listener, t Transport) Transport)
- func (l *ListenWebsocket) SetOnClose(callback func(t Transport, e error))
- func (l *ListenWebsocket) SetOnConnect(callback func(l Listener, t Transport))
- func (l *ListenWebsocket) SetReadLimit(limit int64)
- func (l *ListenWebsocket) SetTimeout(to time.Duration)
- type Listener
- type MultiListener
- func (m *MultiListener) AddListener(l Listener)
- func (m *MultiListener) ClearListeners()
- func (m *MultiListener) Close() error
- func (m *MultiListener) CloseTransports() error
- func (m *MultiListener) GetListeners() []Listener
- func (m *MultiListener) GetReadLimit() int64
- func (m *MultiListener) GetTimeout() time.Duration
- func (m *MultiListener) IsActive() bool
- func (m *MultiListener) RemoveListener(l Listener)
- func (m *MultiListener) SetOnAccept(callback func(l Listener, t Transport) Transport)
- func (m *MultiListener) SetOnClose(callback func(t Transport, e error))
- func (m *MultiListener) SetOnConnect(callback func(l Listener, t Transport))
- func (m *MultiListener) SetReadLimit(limit int64)
- func (m *MultiListener) SetTimeout(to time.Duration)
- type Transport
- type Websocket
- func (w *Websocket) Activate(conn *websocket.Conn)
- func (w *Websocket) Close() error
- func (w *Websocket) GetID() string
- func (w *Websocket) GetReadLimit() int64
- func (w *Websocket) GetTimeout() time.Duration
- func (w *Websocket) IsActive() bool
- func (w *Websocket) Receive() (*packet.Packet, error)
- func (w *Websocket) Send(p *packet.Packet) error
- func (w *Websocket) SetOnClose(callback func(t Transport, e error))
- func (w *Websocket) SetReadLimit(limit int64)
- func (w *Websocket) SetTimeout(to time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetKeepAlive ¶
func (*Client) GetReadLimit ¶
func (*Client) GetTimeout ¶
func (*Client) SetKeepAlive ¶
func (*Client) SetOnClose ¶
func (*Client) SetReadLimit ¶
func (*Client) SetTimeout ¶
type Handler ¶
type Handler struct { ID string // contains filtered or unexported fields }
func (*Handler) GetReadLimit ¶
func (*Handler) GetTimeout ¶
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*Handler) SetOnClose ¶
func (*Handler) SetReadLimit ¶
func (*Handler) SetTimeout ¶
type ListenHandler ¶
type ListenHandler struct {
// contains filtered or unexported fields
}
func (*ListenHandler) Activate ¶
func (l *ListenHandler) Activate()
func (*ListenHandler) Close ¶
func (l *ListenHandler) Close() error
func (*ListenHandler) CloseTransports ¶
func (l *ListenHandler) CloseTransports() error
func (*ListenHandler) GetReadLimit ¶
func (l *ListenHandler) GetReadLimit() int64
func (*ListenHandler) GetTimeout ¶
func (l *ListenHandler) GetTimeout() time.Duration
func (*ListenHandler) IsActive ¶
func (l *ListenHandler) IsActive() bool
func (*ListenHandler) ServeHTTP ¶
func (l *ListenHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*ListenHandler) SetOnAccept ¶
func (l *ListenHandler) SetOnAccept(callback func(l Listener, t Transport) Transport)
func (*ListenHandler) SetOnClose ¶
func (l *ListenHandler) SetOnClose(callback func(t Transport, e error))
func (*ListenHandler) SetOnConnect ¶
func (l *ListenHandler) SetOnConnect(callback func(l Listener, t Transport))
func (*ListenHandler) SetReadLimit ¶
func (l *ListenHandler) SetReadLimit(limit int64)
func (*ListenHandler) SetTimeout ¶
func (l *ListenHandler) SetTimeout(to time.Duration)
type ListenWebsocket ¶
type ListenWebsocket struct { Upgrader websocket.Upgrader // contains filtered or unexported fields }
func (*ListenWebsocket) Activate ¶
func (l *ListenWebsocket) Activate()
func (*ListenWebsocket) Close ¶
func (l *ListenWebsocket) Close() error
func (*ListenWebsocket) CloseTransports ¶
func (l *ListenWebsocket) CloseTransports() error
func (*ListenWebsocket) GetReadLimit ¶
func (l *ListenWebsocket) GetReadLimit() int64
func (*ListenWebsocket) GetTimeout ¶
func (l *ListenWebsocket) GetTimeout() time.Duration
func (*ListenWebsocket) IsActive ¶
func (l *ListenWebsocket) IsActive() bool
func (*ListenWebsocket) ServeHTTP ¶
func (l *ListenWebsocket) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*ListenWebsocket) SetOnAccept ¶
func (l *ListenWebsocket) SetOnAccept(callback func(l Listener, t Transport) Transport)
func (*ListenWebsocket) SetOnClose ¶
func (l *ListenWebsocket) SetOnClose(callback func(t Transport, e error))
func (*ListenWebsocket) SetOnConnect ¶
func (l *ListenWebsocket) SetOnConnect(callback func(l Listener, t Transport))
func (*ListenWebsocket) SetReadLimit ¶
func (l *ListenWebsocket) SetReadLimit(limit int64)
func (*ListenWebsocket) SetTimeout ¶
func (l *ListenWebsocket) SetTimeout(to time.Duration)
type Listener ¶
type Listener interface { IsActive() bool Close() error SetOnAccept(callback func(l Listener, t Transport) Transport) SetOnConnect(callback func(l Listener, t Transport)) SetOnClose(callback func(t Transport, e error)) CloseTransports() error SetTimeout(to time.Duration) GetTimeout() time.Duration SetReadLimit(limit int64) GetReadLimit() int64 }
type MultiListener ¶
type MultiListener struct {
// contains filtered or unexported fields
}
func NewMultiListener ¶
func (*MultiListener) AddListener ¶
func (m *MultiListener) AddListener(l Listener)
func (*MultiListener) ClearListeners ¶
func (m *MultiListener) ClearListeners()
func (*MultiListener) Close ¶
func (m *MultiListener) Close() error
func (*MultiListener) CloseTransports ¶
func (m *MultiListener) CloseTransports() error
func (*MultiListener) GetListeners ¶
func (m *MultiListener) GetListeners() []Listener
func (*MultiListener) GetReadLimit ¶
func (m *MultiListener) GetReadLimit() int64
func (*MultiListener) GetTimeout ¶
func (m *MultiListener) GetTimeout() time.Duration
func (*MultiListener) IsActive ¶
func (m *MultiListener) IsActive() bool
func (*MultiListener) RemoveListener ¶
func (m *MultiListener) RemoveListener(l Listener)
func (*MultiListener) SetOnAccept ¶
func (m *MultiListener) SetOnAccept(callback func(l Listener, t Transport) Transport)
func (*MultiListener) SetOnClose ¶
func (m *MultiListener) SetOnClose(callback func(t Transport, e error))
func (*MultiListener) SetOnConnect ¶
func (m *MultiListener) SetOnConnect(callback func(l Listener, t Transport))
func (*MultiListener) SetReadLimit ¶
func (m *MultiListener) SetReadLimit(limit int64)
func (*MultiListener) SetTimeout ¶
func (m *MultiListener) SetTimeout(to time.Duration)
type Websocket ¶
type Websocket struct { ID string // contains filtered or unexported fields }
func (*Websocket) GetReadLimit ¶
func (*Websocket) GetTimeout ¶
func (*Websocket) SetOnClose ¶
func (*Websocket) SetReadLimit ¶
func (*Websocket) SetTimeout ¶
Click to show internal directories.
Click to hide internal directories.