dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.16k stars 4.72k forks source link

Netcore2.0 Unix Socket Tcp Send Big Buffer Raise Error Message too long #23338

Closed caozhiyuan closed 4 years ago

caozhiyuan commented 7 years ago

https://github.com/caozhiyuan/DotNetty/tree/dev/examples/SocketAsyncClient https://github.com/caozhiyuan/DotNetty/tree/dev/examples/SocketAsyncServer when nioBuffers total byte size big than 344064,will raise 10040 MessageSize Error(Message Too Long)

SocketError errorCode;
long localWrittenBytes = this.clientSocket.Send(nioBuffers, SocketFlags.None, out errorCode);
if (errorCode != SocketError.Success && errorCode != SocketError.WouldBlock)
{
    throw new SocketException((int)errorCode);
}
taylorreece commented 6 years ago

Was this issue actually solved in 2.1.0, or was it closed prematurely? My team started running into this today with an 8MB message raising a "Message too long" error. Our app is dotnet core 2.0.0 on a Unix box.

caozhiyuan commented 6 years ago

2.0.3 fix it