This commit is contained in:
黄思敏 2022-08-29 10:50:05 +08:00
parent 3abe3ca260
commit 95534e2073

View File

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