15 lines
269 B
Go
Raw Normal View History

2024-01-15 16:08:26 +00:00
package main
import (
"fmt"
"server/core"
"server/packet"
)
// ping is used as a heartbeat and latency check.
func ping(data []byte, client *core.Client) {
fmt.Println("1 - ping!")
server.Send(packet.PING, data, client)
fmt.Println(server.Count(), "clients")
}