Networker icon indicating copy to clipboard operation
Networker copied to clipboard

udp数据传输长度为0

Open qinqoushui opened this issue 5 years ago • 0 comments

  • udp数据传输长度为0
  1. 在IServerPacketProcessor中声明如下:
void ProcessUdpFromBuffer(EndPoint sender, byte[] buffer, int offset = 0, int length = 0);
  1. 在UdpClientListener中未指定数据长度
 private async Task Process(EndPoint endPoint, byte[] buffer)
        {
           // serverPacketProcessor.ProcessUdpFromBuffer(endPoint, buffer);
            serverPacketProcessor.ProcessUdpFromBuffer(endPoint, buffer,0,buffer.Length);
            endPointPool.Push(endPoint);
        }

qinqoushui avatar Feb 15 '20 04:02 qinqoushui