Documentation
¶
Index ¶
- Variables
- func InitFDTable()
- type CmdData
- type IDGenerator
- type IEVEndpoint
- type IEVLoop
- type IHandler
- type IListener
- type ISelector
- type IServer
- type LoopConn
- func (l *LoopConn) AddClient(c connection.EngineConn) error
- func (l *LoopConn) AddCmd(cmd, fd int, dial bool, id uint64, data []byte) error
- func (l *LoopConn) AddListener(lis IListener)
- func (l *LoopConn) AllocID(c connection.EngineConn)
- func (l *LoopConn) DialCnt() int32
- func (l *LoopConn) GenID(seed int) uint64
- func (l *LoopConn) Id() int
- func (l *LoopConn) Init(idx, size, chanSize, pktSizeLimit, cliSbufLimit int)
- func (l *LoopConn) Online() int32
- func (l *LoopConn) Run()
- func (l *LoopConn) SetCheck(interval, limit int64)
- func (l *LoopConn) SetHandler(h IHandler)
- func (l *LoopConn) SetIDGen(gen IDGenerator)
- func (l *LoopConn) SetMax(max int32)
- func (l *LoopConn) SetPollWait(msec int)
- func (l *LoopConn) SetSelector(s ISelector)
- func (l *LoopConn) SetTLSWorker(worker *TLSHandshakeWorker)
- func (l *LoopConn) SetWg(wg *sync.WaitGroup)
- func (l *LoopConn) Stat(now int64, print bool)
- func (l *LoopConn) Stop()
- func (l *LoopConn) SyncTime(sec int64, msec int64)
- type TLSHandshakeWorker
Constants ¶
This section is empty.
Variables ¶
View Source
var CLOSE_BY_ACCEPT = errors.New("BY_ACCEPT")
View Source
var CLOSE_BY_ANTI_IDLE = errors.New("BY_ANTI_IDLE")
View Source
var CLOSE_BY_CLOSE_CMD = errors.New("BY_CLOSE_CMD")
View Source
var CLOSE_BY_DUP_ACCEPT = errors.New("BY_DUP_ACCEPT")
View Source
var CLOSE_BY_SLOW_READER = errors.New("BY_SLOW_READER")
View Source
var CLOSE_BY_USER_LAND = errors.New("BY_USER_LAND")
View Source
var CLOSE_EPOLL_ERR = errors.New("EPOLL_ERROR")
View Source
var CLOSE_MEM_ALLOC_FAIL = errors.New("MEM_ALLOC_FAIL")
View Source
var CLOSE_PKT_PARSE_ERR = errors.New("PKT_PARSE_ERROR")
View Source
var CLOSE_PKT_SIZE_LIMIT = errors.New("PKT_SIZE_LIMIT")
View Source
var CLOSE_READ_ERR = errors.New("READ_ERROR")
View Source
var CLOSE_SEND_ERR = errors.New("SEND_ERROR")
Functions ¶
func InitFDTable ¶
func InitFDTable()
Types ¶
type IDGenerator ¶
type IDGenerator interface {
GetID() uint64
}
type IEVEndpoint ¶
type IEVLoop ¶
type IEVLoop interface {
Init(idx, size, chansize, pktsizelimit, cliSbufLimit int)
AddListener(l IListener)
Run()
SetWg(wg *sync.WaitGroup)
SetHandler(h IHandler)
SetSelector(s ISelector)
AddClient(c connection.EngineConn) error
AllocID(c connection.EngineConn)
SetPollWait(int)
Online() int32
DialCnt() int32
SyncTime(int64, int64)
SetIDGen(IDGenerator)
Stop()
Stat(int64, bool)
Id() int
}
type IHandler ¶
type IHandler interface {
OnReady(s IServer)
OnClosed(c connection.AppConn, err error)
OnConnected(c connection.ProtoConn)
Stat(bool)
}
type LoopConn ¶
type LoopConn struct {
// contains filtered or unexported fields
}
func (*LoopConn) AddClient ¶
func (l *LoopConn) AddClient(c connection.EngineConn) error
func (*LoopConn) AddListener ¶
func (*LoopConn) AllocID ¶
func (l *LoopConn) AllocID(c connection.EngineConn)
func (*LoopConn) SetHandler ¶
func (*LoopConn) SetIDGen ¶
func (l *LoopConn) SetIDGen(gen IDGenerator)
func (*LoopConn) SetPollWait ¶
func (*LoopConn) SetSelector ¶
func (*LoopConn) SetTLSWorker ¶
func (l *LoopConn) SetTLSWorker(worker *TLSHandshakeWorker)
type TLSHandshakeWorker ¶
type TLSHandshakeWorker struct {
// contains filtered or unexported fields
}
func NewTLSHandshakeWorker ¶
func NewTLSHandshakeWorker(maxWorkers int, loops []IEVLoop) *TLSHandshakeWorker
func (*TLSHandshakeWorker) Pending ¶
func (w *TLSHandshakeWorker) Pending() int32
func (*TLSHandshakeWorker) Start ¶
func (w *TLSHandshakeWorker) Start()
func (*TLSHandshakeWorker) Stats ¶
func (w *TLSHandshakeWorker) Stats() (pending int32, maxWorkers, workers, idleWorkers int)
func (*TLSHandshakeWorker) Stop ¶
func (w *TLSHandshakeWorker) Stop()
func (*TLSHandshakeWorker) Submit ¶
func (w *TLSHandshakeWorker) Submit(c *connection.ATLSConn) error
Click to show internal directories.
Click to hide internal directories.