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(),