test
This commit is contained in:
parent
6b79c1a54a
commit
231c1c5605
13
main.go
13
main.go
@ -8,8 +8,19 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
conn, err := net.Dial("tcp", "poop.siteop.biz:3977")
|
conn, err := net.Dial("tcp", "poop.siteop.biz:3977")
|
||||||
failError(err, "net.Dial")
|
failError(err, "net.Dial")
|
||||||
|
|
||||||
logInfoDebug("Connected to poop.siteop.biz:3977")
|
logInfoDebug("Connected to poop.siteop.biz:3977")
|
||||||
|
|
||||||
|
//send auth
|
||||||
|
p := PacketAdminJoin{
|
||||||
|
PType: AdminPacketAdminJoin,
|
||||||
|
Password: "plop",
|
||||||
|
AppName: "gottdad",
|
||||||
|
AppVersion: "alpha",
|
||||||
|
}
|
||||||
|
_, err = conn.Write(p.Bytes())
|
||||||
|
failError(err, "conn.Write")
|
||||||
|
logInfoDebug("Authentication sent")
|
||||||
|
|
||||||
// listen for reply
|
// listen for reply
|
||||||
message, _ := bufio.NewReader(conn).ReadString('\n')
|
message, _ := bufio.NewReader(conn).ReadString('\n')
|
||||||
logInfoDebug("Message from server: %s", message)
|
logInfoDebug("Message from server: %s", message)
|
||||||
|
Loading…
Reference in New Issue
Block a user