From c08c32bd03370512d4f6a1fb3e9d7ddcb3f21cb2 Mon Sep 17 00:00:00 2001 From: esrrhs Date: Wed, 19 Dec 2018 15:54:54 +0800 Subject: [PATCH] add --- client.go | 4 ++-- server.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 7f1d07a..b9d0847 100644 --- a/client.go +++ b/client.go @@ -174,7 +174,7 @@ func (p *Client) processPacket(packet *Packet) { return } - fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data)) + //fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data)) clientConn := p.localIdToConnMap[packet.id] if clientConn == nil { @@ -230,7 +230,7 @@ func (p *Client) ping() { } func (p *Client) showNet() { - fmt.Printf("send %d/s %dKB/s recv %d/s %dKB/s\n", p.sendPacket, p.sendPacket/1024, p.recvPacket, p.recvPacket/1024) + fmt.Printf("send %dPacket/s %dKB/s recv %dPacket/s %dKB/s\n", p.sendPacket, p.sendPacket/1024, p.recvPacket, p.recvPacket/1024) p.sendPacket = 0 p.recvPacket = 0 p.sendPacketSize = 0 diff --git a/server.go b/server.go index 48d63ea..103321c 100644 --- a/server.go +++ b/server.go @@ -73,7 +73,7 @@ func (p *Server) processPacket(packet *Packet) { return } - fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data)) + //fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data)) now := time.Now() @@ -169,7 +169,7 @@ func (p *Server) checkTimeoutConn() { } func (p *Server) showNet() { - fmt.Printf("send %d/s %dKB/s recv %d/s %dKB/s\n", p.sendPacket, p.sendPacket/1024, p.recvPacket, p.recvPacket/1024) + fmt.Printf("send %dPacket/s %dKB/s recv %dPacket/s %dKB/s\n", p.sendPacket, p.sendPacket/1024, p.recvPacket, p.recvPacket/1024) p.sendPacket = 0 p.recvPacket = 0 p.sendPacketSize = 0