Documentation ¶
Index ¶
- type Connection
- type Dispatcher
- func (d *Dispatcher) GetPriCtrlConn(host string) (c *Connection, has bool)
- func (d *Dispatcher) GetPriRevsChan(key uint64) (ch chan *Connection, has bool)
- func (d *Dispatcher) NewPriRevsChan(key uint64) chan *Connection
- func (d *Dispatcher) RegPriCtrlConn(host string, c *Connection) (ok bool)
- func (d *Dispatcher) RemPriRevsChan(key uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
func New ¶
func New(c net.Conn) *Connection
func (*Connection) Alive ¶
func (c *Connection) Alive() bool
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) ImmunityNextClose ¶
func (c *Connection) ImmunityNextClose()
func (*Connection) Load ¶
func (c *Connection) Load() interface{}
func (*Connection) Store ¶
func (c *Connection) Store(data interface{})
type Dispatcher ¶
type Dispatcher struct { PriCtrlConns map[string]*Connection PriRevsChans map[uint64]chan *Connection PCCMutex sync.RWMutex // PriCtrlConns Mutex PRCMutex sync.Mutex // PriRevsConns Mutex }
var DP *Dispatcher
func (*Dispatcher) GetPriCtrlConn ¶
func (d *Dispatcher) GetPriCtrlConn(host string) (c *Connection, has bool)
func (*Dispatcher) GetPriRevsChan ¶
func (d *Dispatcher) GetPriRevsChan(key uint64) (ch chan *Connection, has bool)
func (*Dispatcher) NewPriRevsChan ¶
func (d *Dispatcher) NewPriRevsChan(key uint64) chan *Connection
func (*Dispatcher) RegPriCtrlConn ¶
func (d *Dispatcher) RegPriCtrlConn(host string, c *Connection) (ok bool)
func (*Dispatcher) RemPriRevsChan ¶
func (d *Dispatcher) RemPriRevsChan(key uint64)
Click to show internal directories.
Click to hide internal directories.