Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBuffer overflow #81
Buffer overflow #81
Comments
|
When sending large amounts of data make sure to use proper message sizes. Split the send contents and merge it again on the client. |
Well, I'm doing it that way. But this problem does not exists in C++\CLI version of this library (see: https://github.com/chronoxor/CSharpServer) . |
Hello,
There is an issue when you trying send large packet using TCP Client in one shot.
The error is on server side.
Example:
`
TcpClient client = new TcpClient("127.0.0.1", 9001);
client.Connect();
var toSend = new byte[1024 * 1024 * 1024];// = 1Gb
`
Overflow Error is in Buffer.Reserve(long capacity).
But when you trying doing this that way:
`
TcpClient client = new TcpClient("127.0.0.1", 9001);
client.Connect();
var toSend = new byte[1024 * 1024 * 256];// = 256 Mb
`