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;
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. |
Exception Type | Condition |
---|---|
ArgumentException | mode is not one of SelectRead, SelectWrite, or SelectError. |
Socket Class | Socket Members | System.Net.Sockets Namespace