Documentation ¶
Index ¶
- Constants
- func GetStringLength(st string) int
- func Substring(s string, len int) string
- type ByteBuffer
- func (c *ByteBuffer) GetHexDump() string
- func (c *ByteBuffer) Read_Byte() (b byte, ex *Exception.Exception)
- func (c *ByteBuffer) Read_Bytes(n int) (*ByteBuffer, *Exception.Exception)
- func (c *ByteBuffer) Read_CString() (string, *Exception.Exception)
- func (c *ByteBuffer) Read_Int() (int32, *Exception.Exception)
- func (c *ByteBuffer) Read_Short() (int16, *Exception.Exception)
- func (c *ByteBuffer) Read_String(size int) (string, *Exception.Exception)
- func (c *ByteBuffer) Read_UnsafeByte() byte
- func (c *ByteBuffer) Read_UnsafeInt() int32
- func (c *ByteBuffer) Read_UnsafeShort() int16
- func (c *ByteBuffer) Write_Buffer(d *ByteBuffer) *Exception.Exception
- func (c *ByteBuffer) Write_Byte(data byte) *Exception.Exception
- func (c *ByteBuffer) Write_Bytes(data []byte) *Exception.Exception
- func (c *ByteBuffer) Write_CString(String string) *Exception.Exception
- func (c *ByteBuffer) Write_CStringWithEnc(String string, enc Data.Encoding) *Exception.Exception
- func (c *ByteBuffer) Write_Int(data int32) *Exception.Exception
- func (c *ByteBuffer) Write_Short(data int16) *Exception.Exception
- func (c *ByteBuffer) Write_String(String string) *Exception.Exception
- func (c *ByteBuffer) Write_StringWithCount(String string, count int) *Exception.Exception
- func (c *ByteBuffer) Write_StringWithCountEnc(String string, count int, enc Data.Encoding) *Exception.Exception
- func (c *ByteBuffer) Write_StringWithEnc(String string, enc Data.Encoding) *Exception.Exception
- func (c *ByteBuffer) Write_UnsafeByte(data byte)
- func (c *ByteBuffer) Write_UnsafeInt(data int32)
- func (c *ByteBuffer) Write_UnsafeShort(data int16)
- type Unprocessed
- func (c *Unprocessed) Check()
- func (c *Unprocessed) GetExpected() int32
- func (c *Unprocessed) GetHasUnprocessed() bool
- func (c *Unprocessed) GetLastTimeReceived() int64
- func (c *Unprocessed) GetUnprocessed() *ByteBuffer
- func (c *Unprocessed) Reset()
- func (c *Unprocessed) SetExpected(value int32)
- func (c *Unprocessed) SetHasUnprocessed(value bool)
- func (c *Unprocessed) SetLastTimeReceived(value int64)
- func (c *Unprocessed) SetLastTimeReceivedCurTime()
Constants ¶
const ( SZ_BYTE int = 1 SZ_SHORT int = 2 SZ_INT int = 4 SZ_LONG int = 8 )
Variables ¶
This section is empty.
Functions ¶
func GetStringLength ¶
Types ¶
type ByteBuffer ¶
func NewBuffer ¶
func NewBuffer(inp []byte) *ByteBuffer
NewBuffer create new buffer from preallocated buffer array
func (*ByteBuffer) Read_Byte ¶
func (c *ByteBuffer) Read_Byte() (b byte, ex *Exception.Exception)
Read_Byte read byte with checking error
func (*ByteBuffer) Read_Bytes ¶
func (c *ByteBuffer) Read_Bytes(n int) (*ByteBuffer, *Exception.Exception)
ReadBytes read n byte with checking error
func (*ByteBuffer) Read_CString ¶
func (c *ByteBuffer) Read_CString() (string, *Exception.Exception)
Read_CString read cstring with terminating zero
func (*ByteBuffer) Read_Int ¶
func (c *ByteBuffer) Read_Int() (int32, *Exception.Exception)
Read_Int read int with checking error
func (*ByteBuffer) Read_Short ¶
func (c *ByteBuffer) Read_Short() (int16, *Exception.Exception)
Read_Short read short with checking error
func (*ByteBuffer) Read_String ¶
func (c *ByteBuffer) Read_String(size int) (string, *Exception.Exception)
Read_String read string with limited size
func (*ByteBuffer) Read_UnsafeByte ¶
func (c *ByteBuffer) Read_UnsafeByte() byte
Read_UnsafeByte read byte without knowing about error
func (*ByteBuffer) Read_UnsafeInt ¶
func (c *ByteBuffer) Read_UnsafeInt() int32
Read_UnsafeInt read short without knowing about error
func (*ByteBuffer) Read_UnsafeShort ¶
func (c *ByteBuffer) Read_UnsafeShort() int16
Read_UnsafeShort read short without knowing about error
func (*ByteBuffer) Write_Buffer ¶
func (c *ByteBuffer) Write_Buffer(d *ByteBuffer) *Exception.Exception
Write_Buffer append buffer
func (*ByteBuffer) Write_Byte ¶
func (c *ByteBuffer) Write_Byte(data byte) *Exception.Exception
Write_Byte write a byte to buffer with checking error
func (*ByteBuffer) Write_Bytes ¶
func (c *ByteBuffer) Write_Bytes(data []byte) *Exception.Exception
Write_Bytes write array of byte to buffer
func (*ByteBuffer) Write_CString ¶
func (c *ByteBuffer) Write_CString(String string) *Exception.Exception
func (*ByteBuffer) Write_CStringWithEnc ¶
func (*ByteBuffer) Write_Int ¶
func (c *ByteBuffer) Write_Int(data int32) *Exception.Exception
Write_Int write int with checking error
func (*ByteBuffer) Write_Short ¶
func (c *ByteBuffer) Write_Short(data int16) *Exception.Exception
Write_Short write short with checking error
func (*ByteBuffer) Write_String ¶
func (c *ByteBuffer) Write_String(String string) *Exception.Exception
func (*ByteBuffer) Write_StringWithCount ¶
func (c *ByteBuffer) Write_StringWithCount(String string, count int) *Exception.Exception
func (*ByteBuffer) Write_StringWithCountEnc ¶
func (*ByteBuffer) Write_StringWithEnc ¶
func (*ByteBuffer) Write_UnsafeByte ¶
func (c *ByteBuffer) Write_UnsafeByte(data byte)
Write_UnsafeByte write a byte to buffer without checking error
func (*ByteBuffer) Write_UnsafeInt ¶
func (c *ByteBuffer) Write_UnsafeInt(data int32)
Write_UnsafeInt write int without checking error
func (*ByteBuffer) Write_UnsafeShort ¶
func (c *ByteBuffer) Write_UnsafeShort(data int16)
Write_UnsafeShort write short without checking error
type Unprocessed ¶
type Unprocessed struct {
// contains filtered or unexported fields
}
func NewUnprocessed ¶
func NewUnprocessed() *Unprocessed
func (*Unprocessed) Check ¶
func (c *Unprocessed) Check()
func (*Unprocessed) GetExpected ¶
func (c *Unprocessed) GetExpected() int32
func (*Unprocessed) GetHasUnprocessed ¶
func (c *Unprocessed) GetHasUnprocessed() bool
func (*Unprocessed) GetLastTimeReceived ¶
func (c *Unprocessed) GetLastTimeReceived() int64
func (*Unprocessed) GetUnprocessed ¶
func (c *Unprocessed) GetUnprocessed() *ByteBuffer
func (*Unprocessed) Reset ¶
func (c *Unprocessed) Reset()
func (*Unprocessed) SetExpected ¶
func (c *Unprocessed) SetExpected(value int32)
func (*Unprocessed) SetHasUnprocessed ¶
func (c *Unprocessed) SetHasUnprocessed(value bool)
func (*Unprocessed) SetLastTimeReceived ¶
func (c *Unprocessed) SetLastTimeReceived(value int64)
func (*Unprocessed) SetLastTimeReceivedCurTime ¶
func (c *Unprocessed) SetLastTimeReceivedCurTime()