mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-13 04:46:38 -05:00
20 lines
320 B
Go
20 lines
320 B
Go
|
package d2netpacket
|
||
|
|
||
|
import (
|
||
|
"github.com/OpenDiablo2/OpenDiablo2/d2networking/d2netpacket/d2netpackettype"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type PingPacket struct {
|
||
|
TS time.Time `json:"ts"`
|
||
|
}
|
||
|
|
||
|
func CreatePingPacket() NetPacket {
|
||
|
return NetPacket{
|
||
|
PacketType: d2netpackettype.Ping,
|
||
|
PacketData: PingPacket{
|
||
|
TS: time.Now(),
|
||
|
},
|
||
|
}
|
||
|
}
|