示例#1
0
文件: network.go 项目: Emudofus/gofus
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)
}
示例#2
0
文件: network.go 项目: Emudofus/gofus
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)
}