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 Get256KBytes() *[]byte
- func NewWriterF(f func(writer *Writer)) []byte
- func Put256KBytes(b *[]byte)
- func PutWriter(w *Writer)
- func ReleaseGzipWriter(w *GzipWriter)
- 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 DynamicProtoMessage
- type GzipWriter
- 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) ReadInt64() int64
- 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) Cap() int
- func (w *Writer) EncryptAndWrite(key []byte, data []byte)
- func (w *Writer) Grow(n int)
- func (w *Writer) Reset()
- func (w *Writer) Write(b []byte)
- func (w *Writer) WriteBool(b bool)
- func (w *Writer) WriteByte(b byte)
- func (w *Writer) WriteBytesShort(data []byte)
- func (w *Writer) WriteHex(h string)
- 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) 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 ReleaseGzipWriter ¶
func ReleaseGzipWriter(w *GzipWriter)
func ToChunkedBytesF ¶
func ToIPV4Address ¶
func UInt32ToIPV4Address ¶
func ZlibCompress ¶
func ZlibUncompress ¶
Types ¶
type DynamicProtoMessage ¶
type DynamicProtoMessage map[uint64]interface{}
func (DynamicProtoMessage) Encode ¶
func (msg DynamicProtoMessage) Encode() []byte
type GzipWriter ¶
type GzipWriter struct {
// contains filtered or unexported fields
}
func AcquireGzipWriter ¶
func AcquireGzipWriter() *GzipWriter
func (*GzipWriter) Bytes ¶
func (w *GzipWriter) Bytes() []byte
func (*GzipWriter) Close ¶
func (w *GzipWriter) Close() error
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 ¶
Writer 写入
func (*Writer) EncryptAndWrite ¶
func (*Writer) WriteBytesShort ¶
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.