Documentation ¶
Index ¶
- Constants
- Variables
- type Codec
- type CodecEntity
- func (c *CodecEntity) DecodeMessage(data []byte) (*message.Message, error)
- func (c *CodecEntity) DecodePacket(data []byte) ([]*packet.Packet, error)
- func (c *CodecEntity) EncodeMessage(m *message.Message) ([]byte, error)
- func (c *CodecEntity) EncodePacket(packets []*packet.Packet) ([]byte, error)
- func (c *CodecEntity) String() string
Constants ¶
View Source
const ( HeadLength = 4 MaxPacketSize = 64 * 1024 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct { }
func (*Codec) Entity ¶
func (c *Codec) Entity(dictionary message.Dictionary) codec.CodecEntity
type CodecEntity ¶
type CodecEntity struct {
// contains filtered or unexported fields
}
func NewCodecEntity ¶
func NewCodecEntity(dictionary message.Dictionary) *CodecEntity
func (*CodecEntity) DecodeMessage ¶
func (c *CodecEntity) DecodeMessage(data []byte) (*message.Message, error)
func (*CodecEntity) DecodePacket ¶
func (c *CodecEntity) DecodePacket(data []byte) ([]*packet.Packet, error)
func (*CodecEntity) EncodeMessage ¶
func (c *CodecEntity) EncodeMessage(m *message.Message) ([]byte, error)
func (*CodecEntity) EncodePacket ¶
func (c *CodecEntity) EncodePacket(packets []*packet.Packet) ([]byte, error)
func (*CodecEntity) String ¶ added in v1.1.49
func (c *CodecEntity) String() string
Click to show internal directories.
Click to hide internal directories.