mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-20 03:16:26 -05:00
13 lines
487 B
Go
13 lines
487 B
Go
package d2netpacket
|
|
|
|
import "github.com/OpenDiablo2/OpenDiablo2/d2networking/d2netpacket/d2netpackettype"
|
|
|
|
// NetPacket is used to wrap and send all packet types under d2netpacket.
|
|
// When decoding a packet: First the PacketType byte is read, then the
|
|
// PacketData is unmarshalled to a struct of the type associated with
|
|
// PacketType.
|
|
type NetPacket struct {
|
|
PacketType d2netpackettype.NetPacketType `json:"packetType"`
|
|
PacketData interface{} `json:"packetData"`
|
|
}
|