Documentation ¶
Index ¶
- Constants
- Variables
- type Channel
- func (c *Channel) Bind(event string, h Handler)
- func (c *Channel) BindAll(h Handler)
- func (c *Channel) BindAllFunc(h func(Event))
- func (c *Channel) BindFunc(event string, h func(Event))
- func (c *Channel) Unbind(event string, h Handler)
- func (c *Channel) UnbindAll(h Handler)
- func (c *Channel) UnbindAllFunc(h func(Event))
- func (c *Channel) UnbindFunc(event string, h func(Event))
- type Channels
- type Client
- func (c *Client) Bind(event string, h Handler)
- func (c *Client) BindAll(h Handler)
- func (c *Client) BindAllFunc(h func(Event))
- func (c *Client) BindFunc(event string, h func(Event))
- func (c *Client) Close()
- func (c *Client) Subscribe(channel string) *Channel
- func (c *Client) Unbind(event string, h Handler)
- func (c *Client) UnbindAll(h Handler)
- func (c *Client) UnbindAllFunc(h func(Event))
- func (c *Client) UnbindFunc(event string, h func(Event))
- func (c *Client) Unsubscribe(channel string)
- type Event
- type Handler
- type HandlerFunc
- type Pusher
- type TimeoutReason
- type TimeoutTimer
Constants ¶
View Source
const ( IN_CHANNEL_SIZE = 100 OUT_CHANNEL_SIZE = 10 )
View Source
const (
MAX_RECONNECT_WAIT = time.Second * 30
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Channel ¶
func (*Channel) BindAllFunc ¶
func (*Channel) UnbindAllFunc ¶
func (*Channel) UnbindFunc ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientUrl ¶
func (*Client) BindAllFunc ¶
func (*Client) UnbindAllFunc ¶
func (*Client) UnbindFunc ¶
func (*Client) Unsubscribe ¶
type HandlerFunc ¶
type HandlerFunc func(Event)
func (HandlerFunc) HandleEvent ¶
func (f HandlerFunc) HandleEvent(e Event)
type Pusher ¶
type TimeoutReason ¶
type TimeoutReason int
const ( NoTimeout TimeoutReason = iota ConnectTimeout ActivityTimeout PingTimeout )
type TimeoutTimer ¶
type TimeoutTimer struct { C <-chan time.Time Reason TimeoutReason // contains filtered or unexported fields }
func (*TimeoutTimer) Expired ¶
func (t *TimeoutTimer) Expired() bool
func (*TimeoutTimer) Reset ¶
func (t *TimeoutTimer) Reset()
func (*TimeoutTimer) SetTimeout ¶
func (t *TimeoutTimer) SetTimeout(reason TimeoutReason, d time.Duration)
func (*TimeoutTimer) Stop ¶
func (t *TimeoutTimer) Stop()
Click to show internal directories.
Click to hide internal directories.