Versions in this module Expand all Collapse all v0 v0.0.1 Mar 24, 2023 Changes in this version + const EV_MSG_TYPE_ATTACH + const EV_MSG_TYPE_DETACH + const EV_MSG_TYPE_MSG + type CallbackAddSession func(session Session) + type CallbackClose func(session Session, err error) + type CallbackMessage func(session Session, hdr interface{}, payload []byte) + type CallbackTimer func(sessions map[Session]time.Time) + type Codec interface + Decode func(reader *bufio.Reader) (interface{}, []byte, error) + Encode func(msdId interface{}, payload []byte) ([]byte, error) + type Evloop struct + func NewEvloop() *Evloop + func (this *Evloop) AddSession(session Session) error + func (this *Evloop) Run() + func (this *Evloop) SetCallbackOnAddConn(cb CallbackAddSession) + func (this *Evloop) SetCallbackOnClose(cb CallbackClose) + func (this *Evloop) SetCallbackOnMessage(cb CallbackMessage) + func (this *Evloop) SetCallbackOnTimer(cb CallbackTimer) + func (this *Evloop) SetTimerTick(tick time.Duration) + type EvloopMsg struct + type Session interface + GetCodec func() Codec + GetConn func() net.Conn + GetUserData func() interface{}