Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Size is the number of connections of this group. Size int // GenConn is the connection generator function. GenConn func() (messageconn.Conn, error) // EnableHeartBeat for the ws connections. EnableHeartBeat bool // HeartBeatInterval is how often to send a heart beat message. HeartBeatInterval time.Duration }
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func NewConn ¶
func NewConn(conn messageconn.Conn) *Conn
func (*Conn) ReadMessage ¶
func (*Conn) ReplaceConn ¶
func (c *Conn) ReplaceConn(conn messageconn.Conn)
func (*Conn) SetUnusable ¶
func (c *Conn) SetUnusable()
func (*Conn) WriteMessage ¶
type ConnGroup ¶
type ConnGroup struct {
// contains filtered or unexported fields
}
ConnGroup is a group of few connections.
func (*ConnGroup) AddConn ¶
func (cg *ConnGroup) AddConn(netConn messageconn.Conn)
func (*ConnGroup) ReadMessage ¶
func (*ConnGroup) WriteMessage ¶
type ConnList ¶
type ConnList struct {
// contains filtered or unexported fields
}
ConnList is a circle linked list of connections.
func (*ConnList) GetCurConn ¶
Click to show internal directories.
Click to hide internal directories.