PewServer/serverbound.go
2024-07-31 17:29:27 +02:00

21 lines
337 B
Go

package main
import (
"log"
)
//packet 0x0000 ping ({}byte data)
//packet 0x0001 handshake (string name)
func doPacketAction(data []byte, client *Client) {
response := make([]byte, 1024)
conn := *client.conn
write, err := conn.Write(response)
if err != nil || write != len(response) {
log.Fatal("Write failed")
return
}
}