This commit is contained in:
黄思敏 2022-08-26 11:00:18 +08:00
parent 199f1e91fb
commit 139a26705a
2 changed files with 2 additions and 4 deletions

View File

@ -236,12 +236,11 @@ func (nc *NetCard) runRead() {
func (nc *NetCard) runWrite() {
var ifce *water.Interface = nc.ifce
var err error
var buf = bytes.NewBuffer(nil)
for wframe := range nc.FrameChan {
log.Printf("get wframes bytes len: %d", len(wframe))
buf.Reset()
buf.Write(wframe)
var buf = bytes.NewBuffer(wframe)
// zdec, err := zstd.NewReader(buf)
// if err != nil {

1
rpc.go
View File

@ -44,7 +44,6 @@ func (s *RPCServer) SendFrames(stream gen.FrameService_SendFramesServer) error {
log.Panic(err)
}
log.Printf("request: %v", len(request.Frames))
s.netCard.FrameChan <- request.GetFrames() // 接受数据 广播到网卡上
}