Versions in this module Expand all Collapse all v1 v1.3.0 Jan 27, 2020 Changes in this version + const EncryptPublic + const EncryptSymmetric + const ZippedRequest + const ZippedResponse + var HeaderOffsets = map[int]int + type Channel struct + Logger logs.LogWriter + func NewChannel(sc *sirenaXML.Config, l logs.LogWriter) (*Channel, error) + func (c *Channel) GetKeyData() KeyData + func (c *Channel) NewRequest(msg []byte) (*Packet, error) + func (c *Channel) SendMsg(msg []byte) ([]byte, error) + func (c *Channel) SetLogger(l logs.LogWriter) + type Header struct + ClientID uint16 + CreatedAt uint32 + Flags *HeaderFlags + KeyID uint32 + MessageID uint32 + MessageLength uint32 + RequestNoHandled bool + func (h *Header) ToBytes() []byte + type HeaderFlags struct + func NewHeaderFlags(preset byte) *HeaderFlags + func (hf *HeaderFlags) Clear(flag byte) + func (hf *HeaderFlags) Has(flag byte) bool + func (hf *HeaderFlags) Set(flag byte) + func (hf *HeaderFlags) ToByte() byte + func (hf *HeaderFlags) Toggle(flag byte) + type KeyData struct + ID uint32 + Key []byte + type MsgPool struct + func NewMsgPool(rp *RespPool, size uint32) (*MsgPool, error) + func (p *MsgPool) GetMsgID() uint32 + func (p *MsgPool) GetPool() chan uint32 + func (p *MsgPool) ReturnMsgIDToPool(id uint32) + type Packet struct + func NewPacket(cfg *sirenaXML.Config, key []byte, keyID uint32) (*Packet, error) + type RespPool struct + func NewRespPool() *RespPool + func (rp *RespPool) Add(msgID uint32) + func (rp *RespPool) GetPacket(msgID uint32) *Packet + func (rp *RespPool) SavePacket(msgID uint32, p *Packet) error