예제 #1
0
파일: client.go 프로젝트: RobWC/enet
func ping_on_connect(host enet.Host, ep string, reason int) {
	if reason == 0 {
		host.Write(ep, 0, []byte("hello enet"))
	}
}
예제 #2
0
파일: server.go 프로젝트: RobWC/enet
func pong(host enet.Host, ep string, chanid uint8, payload []byte) {
	host.Write(ep, chanid, payload)

	fmt.Printf("dat pong %v\n", ep)
}