func (ctx *context) send(msg backend.Message) error { log.Printf("[backend-net] SND(%d)", msg.Opcode()) backend.Put(ctx.conn, msg.Opcode()) return msg.Serialize(ctx.conn) }
func (client *Client) Send(msg backend.Message) error { log.Printf("[backend-net-client-%04d] SND(%d)", client.id, msg.Opcode()) backend.Put(client, msg.Opcode()) return msg.Serialize(client) }