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)