C
C# Learner
When I try to set/get a System.Net.Sockets.Socket's MaxConnections socket
option value, an exception is thrown.
Is the MaxConnections field not supported on Windows?
Example code:
Socket socket = new Socket(AddressFamily.Unspecified,
SocketType.Stream, ProtocolType.Tcp);
socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.MaxConnections, 5);
Exception message:
An unhandled exception of type 'System.Net.Sockets.SocketException'
occurred in system.dll
Additional information: An unknown, invalid, or unsupported option or
level was specified in a getsockopt or setsockopt call
option value, an exception is thrown.
Is the MaxConnections field not supported on Windows?
Example code:
Socket socket = new Socket(AddressFamily.Unspecified,
SocketType.Stream, ProtocolType.Tcp);
socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.MaxConnections, 5);
Exception message:
An unhandled exception of type 'System.Net.Sockets.SocketException'
occurred in system.dll
Additional information: An unknown, invalid, or unsupported option or
level was specified in a getsockopt or setsockopt call