15 lines
269 B
Go
15 lines
269 B
Go
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")
|
|
}
|