Documentation ¶
Index ¶
- Variables
- func ConvertTLSConfigToDTLSConfig(tlsConfig *tls.Config) *dtls.Config
- func GetBytesBuf(size int) []byte
- func GetMsgType(m interface{}) arhatgopb.MsgType
- func NewCmd(marshal types.MarshalFunc, kind arhatgopb.CmdType, id, seq uint64, ...) (*arhatgopb.Cmd, error)
- func NewMsg(marshal types.MarshalFunc, kind arhatgopb.MsgType, id, ack uint64, ...) (*arhatgopb.Msg, error)
- func PutBytesBuf(b *[]byte)
- type BaseHandler
- type StreamManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMsgSendFuncNotSet = errors.New("message send func not set")
Functions ¶
func GetBytesBuf ¶ added in v0.3.0
func GetMsgType ¶ added in v0.3.0
func PutBytesBuf ¶ added in v0.3.0
func PutBytesBuf(b *[]byte)
Types ¶
type BaseHandler ¶ added in v0.4.0
type BaseHandler struct {
// contains filtered or unexported fields
}
func NewBaseHandler ¶ added in v0.4.0
func NewBaseHandler(mu *sync.RWMutex) *BaseHandler
func (*BaseHandler) SendMsg ¶ added in v0.4.0
func (h *BaseHandler) SendMsg(msg *arhatgopb.Msg) error
func (*BaseHandler) SetMsgSendFunc ¶ added in v0.4.0
func (h *BaseHandler) SetMsgSendFunc(sendMsg types.MsgSendFunc)
type StreamManager ¶ added in v0.4.0
type StreamManager struct {
// contains filtered or unexported fields
}
func NewStreamManager ¶ added in v0.4.0
func NewStreamManager() *StreamManager
func (*StreamManager) Add ¶ added in v0.4.0
func (m *StreamManager) Add(sid uint64, create func() (io.WriteCloser, types.ResizeHandleFunc, error)) error
func (*StreamManager) Del ¶ added in v0.4.0
func (m *StreamManager) Del(sid uint64)
func (*StreamManager) Resize ¶ added in v0.4.0
func (m *StreamManager) Resize(sid uint64, cols, rows uint32)
func (*StreamManager) Write ¶ added in v0.4.0
func (m *StreamManager) Write(sid, seq uint64, data []byte)
Click to show internal directories.
Click to hide internal directories.