Пример #1
0
func (this *PacketServerStatusPingCodec) Decode(reader io.Reader, util []byte) (decode packet.Packet, err error) {
	packetServerStatusPing := &PacketServerStatusPing{}
	packetServerStatusPing.Time, err = packet.ReadInt64(reader, util)
	if err != nil {
		return
	}
	return packetServerStatusPing, nil
}
func (this *packetServerStatusPingCodec) Decode(reader io.Reader, util []byte) (decode packet.Packet, err error) {
	packetServerStatusPing := new(PacketServerStatusPing)
	packetServerStatusPing.Time, err = packet.ReadInt64(reader, util)
	if err != nil {
		return
	}
	decode = packetServerStatusPing
	return
}
Пример #3
0
func (this *packetClientStatusPingCodec) Decode(reader io.Reader) (decode packet.Packet, err error) {
	packetClientStatusPing := new(PacketClientStatusPing)
	packetClientStatusPing.Time, err = packet.ReadInt64(reader)
	if err != nil {
		return
	}
	decode = packetClientStatusPing
	return
}