From 02f46a18949ac6923be4718f926d3b0dc49055bd 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:55:44 +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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device.go b/device.go index 2e5ce66..7ec9250 100644 --- a/device.go +++ b/device.go @@ -89,8 +89,8 @@ func (cli *RPCClient) run() { 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])) + log.Printf("send to target %s source bytes: %d", waterutil.IPv4Destination(cliBuffer.BytesArray[0]), len(cliBuffer.BytesArray[0])) + err := enc.Encode(cliBuffer.BytesArray) if err != nil { log.Panic(err) @@ -269,9 +269,9 @@ func (nc *NetCard) runWrite() { log.Panic(err) } - log.Printf("get wframes decode len: %d", len(bufs[0])) - for _, buf := range bufs { + log.Printf("get wframes decode len: %d", len(buf)) + log.Printf("get decode frames decode source: %s dst: %s", waterutil.IPv4Source(buf), waterutil.IPv4Destination(buf)) _, err := ifce.Write(buf) if err != nil { log.Panic(err)