mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-12 20:36:25 -05:00
336c6719ee
* Connection manager implementation to disconnect timed out users. * Connection manager implementation to disconnect timed out users.
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(),
|
|
},
|
|
}
|
|
}
|