Messages use Bytes instead of WriteTo
This commit is contained in:
@@ -24,9 +24,7 @@ func Connect(options map[string] string) (c *conn, err error) {
|
||||
|
||||
msg := newStartupMessage()
|
||||
msg.options["user"] = "jack"
|
||||
|
||||
msg.WriteTo(c.conn)
|
||||
|
||||
c.conn.Write(msg.Bytes())
|
||||
|
||||
buf := make([]byte, 512)
|
||||
|
||||
@@ -37,4 +35,4 @@ func Connect(options map[string] string) (c *conn, err error) {
|
||||
println(num)
|
||||
|
||||
return c, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user