Documentation
¶
Index ¶
- func DecodeMessage(b *bytes.Buffer) (msg *entities.Message, err error)
- func DecodeMessageFromBytes(b []byte) (msg *entities.Message, err error)
- func DecodeSession(b *bytes.Buffer) (sess *entities.Session, err error)
- func EncodeMessage(msg *entities.Message, b *bytes.Buffer)
- func EncodeSession(sess *entities.Session, b *bytes.Buffer)
- func ReadBool(r *bytes.Buffer) (bool, error)
- func ReadString(r *bytes.Buffer) (b []byte, err error)
- func ReadUint16(r *bytes.Buffer) (uint16, error)
- func ReadUint32(r *bytes.Buffer) (uint32, error)
- func WriteBool(w *bytes.Buffer, b bool)
- func WriteString(w *bytes.Buffer, s []byte)
- func WriteUint16(w *bytes.Buffer, i uint16)
- func WriteUint32(w *bytes.Buffer, i uint32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeMessage ¶
DecodeMessage decodes message from buffer.
func DecodeMessageFromBytes ¶
DecodeMessageFromBytes decodes message from bytes.
func DecodeSession ¶
DecodeSession decodes a session from a byte buffer
func EncodeMessage ¶
EncodeMessage encodes message into bytes and write it to the buffer
func EncodeSession ¶
EncodeSession encodes a session into a byte buffer
func ReadString ¶
ReadString reads a string from a byte buffer
func ReadUint16 ¶
ReadUint16 reads an uint16 from a byte buffer
func ReadUint32 ¶
ReadUint32 reads an uint32 from a byte buffer
func WriteString ¶
WriteString writes a string into a byte buffer as a length-value
func WriteUint16 ¶
WriteUint16 writes an uint16 into a byte buffer
func WriteUint32 ¶
WriteUint32 writes an uint into a byte buffer
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.