From 95534e2073e8f18f11e832d74ffcf88063e3c0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=95=8F?= Date: Mon, 29 Aug 2022 10:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device.go b/device.go index bed8d00..2e5ce66 100644 --- a/device.go +++ b/device.go @@ -88,6 +88,8 @@ func (cli *RPCClient) run() { // encode gob enc := gob.NewEncoder(buf) cliBuffer := <-cli.FrameChan + + log.Printf("send to target %s bytes: %d", waterutil.IPv4Destination(cliBuffer.BytesArray[0]), len(cliBuffer.BytesArray[0])) log.Printf("get from source bytes: %d", len(cliBuffer.BytesArray[0])) err := enc.Encode(cliBuffer.BytesArray) if err != nil { @@ -104,7 +106,6 @@ func (cli *RPCClient) run() { // log.Println(err) // } - log.Printf("send to target %s bytes: %d", waterutil.IPv4Destination(buf.Bytes()), len(buf.Bytes())) // 发到对面的网卡 err = stream.Send(&gen.Request{ Frames: buf.Bytes(),