NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Socket.Poll

Determines the status of the socket.

[Visual Basic]
Public Function Poll( _
   ByVal microSeconds As Integer, _
   ByVal mode As SelectMode _
) As Boolean
[C#]
public bool Poll(
   int microSeconds,
   SelectMode mode
);
[C++]
public: bool Poll(
   int microSeconds,
   SelectMode mode
);
[JScript]
public function Poll(
   microSeconds : int,
   mode : SelectMode
) : Boolean;

Parameters

microSeconds
The time to wait for a response, in microseconds.
mode
[To be supplied.]

Return Value

Mode Return Value
SelectRead true if Listen has been called and a connection is pending, Accept will succeed;

-or-

true if data is available for reading;

-or-

true, if connection has been closed, reset, or terminated;

otherwise, returns false.

SelectWrite true, if processing a non-blocking Connect, connection has succeeded;

-or-

true, if data can be sent;

otherwise, returns false.

SelectError true, if processing a non-blocking Connect, connection has failed;

-or-

true, if SoOOBInline is not set and out-of-band data is available;

otherwise, returns false.

Exceptions

Exception Type Condition
ArgumentException mode is not one of SelectRead, SelectWrite, or SelectError.

See Also

Socket Class | Socket Members | System.Net.Sockets Namespace