J
Joe Kinsella
The following code behaves differently from what I would expect:
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
System.Net.Sockets.ProtocolType.Tcp);
socket.Blocking = false;
socket.Connect(ipe);
isConnected = socket.Poll(30*1000000, SelectMode.SelectWrite);
I would have expected that once I set the socket to non-blocking, the
connect would return immediately and the poll would wait up to 30 seconds
for the connect to succeed.
Instead, what I see is that after 10 or so seconds, the Connect() throws a
SocketException ("A non-blocking socket operation could not be completed
immediately").
Am I misunderstanding the documentation? Help would be appreciated.
Joe
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
System.Net.Sockets.ProtocolType.Tcp);
socket.Blocking = false;
socket.Connect(ipe);
isConnected = socket.Poll(30*1000000, SelectMode.SelectWrite);
I would have expected that once I set the socket to non-blocking, the
connect would return immediately and the poll would wait up to 30 seconds
for the connect to succeed.
Instead, what I see is that after 10 or so seconds, the Connect() throws a
SocketException ("A non-blocking socket operation could not be completed
immediately").
Am I misunderstanding the documentation? Help would be appreciated.
Joe