Documentation ¶
Index ¶
- func AppendUUID(dst []byte, uuid []byte) []byte
- func CalculateImageResourceId(md5 []byte) string
- func GZipCompress(data []byte) []byte
- func GZipUncompress(src []byte) []byte
- func GenUUID(uuid []byte) []byte
- func NewWriterF(f func(writer *Writer)) []byte
- func ToBytes(i interface{}) []byte
- func ToChunkedBytesF(b []byte, size int, f func([]byte))
- func ToIPV4Address(arr []byte) string
- func UInt32ToIPV4Address(i uint32) string
- func ZlibCompress(data []byte) []byte
- func ZlibUncompress(src []byte) []byte
- type NetworkReader
- type Reader
- func (r *Reader) Len() int
- func (r *Reader) ReadAvailable() []byte
- func (r *Reader) ReadByte() byte
- func (r *Reader) ReadBytes(len int) []byte
- func (r *Reader) ReadBytesShort() []byte
- func (r *Reader) ReadInt32() int32
- func (r *Reader) ReadString() string
- func (r *Reader) ReadStringLimit(limit int) string
- func (r *Reader) ReadStringShort() string
- func (r *Reader) ReadTlvMap(tagSize int) (m TlvMap)
- func (r *Reader) ReadUInt16() uint16
- type TEA
- type TlvMap
- type Writer
- func (w *Writer) Bytes() []byte
- func (w *Writer) EncryptAndWrite(key []byte, data []byte)
- func (w *Writer) Write(b []byte)
- func (w *Writer) WriteBool(b bool)
- func (w *Writer) WriteByte(b byte)
- func (w *Writer) WriteIntLvPacket(offset int, f func(writer *Writer))
- func (w *Writer) WriteString(v string)
- func (w *Writer) WriteStringShort(v string)
- func (w *Writer) WriteTlv(data []byte)
- func (w *Writer) WriteTlvLimitedSize(data []byte, limit int)
- func (w *Writer) WriteUInt16(v uint16)
- func (w *Writer) WriteUInt32(v uint32)
- func (w *Writer) WriteUInt64(v uint64)
- func (w *Writer) WriteUniPacket(commandName string, sessionId, extraData, body []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUUID ¶
func GZipCompress ¶
func GZipUncompress ¶
func NewWriterF ¶
func ToChunkedBytesF ¶
func ToIPV4Address ¶
func UInt32ToIPV4Address ¶
func ZlibCompress ¶
func ZlibUncompress ¶
Types ¶
type NetworkReader ¶
type NetworkReader struct {
// contains filtered or unexported fields
}
func NewNetworkReader ¶
func NewNetworkReader(conn net.Conn) *NetworkReader
func (*NetworkReader) ReadByte ¶
func (r *NetworkReader) ReadByte() (byte, error)
func (*NetworkReader) ReadInt32 ¶
func (r *NetworkReader) ReadInt32() (int32, error)
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadAvailable ¶
func (*Reader) ReadBytesShort ¶
func (*Reader) ReadString ¶
func (*Reader) ReadStringLimit ¶
func (*Reader) ReadStringShort ¶
func (*Reader) ReadTlvMap ¶
func (*Reader) ReadUInt16 ¶
type Writer ¶
func (*Writer) EncryptAndWrite ¶
func (*Writer) WriteIntLvPacket ¶
func (*Writer) WriteString ¶
func (*Writer) WriteStringShort ¶
func (*Writer) WriteTlvLimitedSize ¶
func (*Writer) WriteUInt16 ¶
func (*Writer) WriteUInt32 ¶
func (*Writer) WriteUInt64 ¶
func (*Writer) WriteUniPacket ¶
Click to show internal directories.
Click to hide internal directories.