S
Stephan Steiner
Hi
I use the following line in my code to increase the socket buffer size to
ensure that packets sent from a server won't be dropped because the buffer
fills up and the application isn't emptying the receive buffer fast enough.
sock.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveBuffer, 65536);
This code works just fine on WM2k3, however I have recently downgraded to
PPC2k2 and now my program always fails with a
System.Net.Sockets.SocketException (An unknown, invalid, or unsupported
option or level was specified in a getsockopt or setsockopt call) error as
soon as this line is executed. If I comment it out, everything is fine but I
start loosing packets which is unacceptable. To verify that this line is
indeed the cause I've also executed my program on both PPC2k2 and WM2k3 and
a WM2k3 device we have here at work, and the picture is clear: It fails on
the PPC2k2 emulator and the PPC2k2 device, and works just fine on WM2k3
device and WM2k3 emulator.
I guess my question is why are there options in the .NET CF (which was
created prior to the release of WM2k3) that fail on PPC2k2 but work on the
latest OS? And is there any other way to increase (and decrease.. ) socket
buffer sizes on PPC2k2?
Stephan
I use the following line in my code to increase the socket buffer size to
ensure that packets sent from a server won't be dropped because the buffer
fills up and the application isn't emptying the receive buffer fast enough.
sock.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveBuffer, 65536);
This code works just fine on WM2k3, however I have recently downgraded to
PPC2k2 and now my program always fails with a
System.Net.Sockets.SocketException (An unknown, invalid, or unsupported
option or level was specified in a getsockopt or setsockopt call) error as
soon as this line is executed. If I comment it out, everything is fine but I
start loosing packets which is unacceptable. To verify that this line is
indeed the cause I've also executed my program on both PPC2k2 and WM2k3 and
a WM2k3 device we have here at work, and the picture is clear: It fails on
the PPC2k2 emulator and the PPC2k2 device, and works just fine on WM2k3
device and WM2k3 emulator.
I guess my question is why are there options in the .NET CF (which was
created prior to the release of WM2k3) that fail on PPC2k2 but work on the
latest OS? And is there any other way to increase (and decrease.. ) socket
buffer sizes on PPC2k2?
Stephan