[Mono-list] Socket send/receive buffer sizes set incorrectly
Nick Berardi
nberardi at zigamorph.com
Wed Aug 3 07:59:53 EDT 2005
They must be because the Linux values are double the Windows values. Or
else the socket.GetSocketOption method is off.
-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Peter De Jager
Sent: Wednesday, August 03, 2005 4:19 AM
To: mono-list at lists.ximian.com
Subject: [Mono-list] Socket send/receive buffer sizes set incorrectly
When using Socket.SetSocketOption to set send/receive buffer sizes, the
actual buffer sizes are set to twice the values specified, e.g.:
// set send/receive buffer sizes
socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.SendBuffer, 8192);
socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveBuffer, 16384);
// display...
Console.WriteLine(socket.GetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.SendBuffer));
Console.WriteLine(socket.GetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveBuffer));
On Linux, this displays:
16384
32768
instead of:
8192
16384
Are socket options handled differently on Linux vs Windows?
Pete.
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list