Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EchoPacket ¶
type EchoPacket struct {
// contains filtered or unexported fields
}
func NewWallPacket(buff[] byte,hasLengthField bool,tyc int32) *EchoPacket { p := &EchoPacket{} if hasLengthField { p.buff = buf } else { p.buff = make([]byte, 4+len(buff)) binary.BigEndian.PutUint16(p.buff[0:2],uint16(len(buff) + 2)) binary.BigEndian.PutUint16(p.buff[2:4],uint16(tyc)) copy(p.buff[4:],buff) } }
func NewEchoPacket ¶
func NewEchoPacket(buff []byte, hasLengthField bool, tyc int32) *EchoPacket
func (*EchoPacket) GetBody ¶
func (this *EchoPacket) GetBody() []byte
func (*EchoPacket) GetLength ¶
func (this *EchoPacket) GetLength() uint16
func (*EchoPacket) GetType ¶
func (this *EchoPacket) GetType() uint16
func (*EchoPacket) Serialize ¶
func (this *EchoPacket) Serialize() []byte
Click to show internal directories.
Click to hide internal directories.