Skip to content

Commit 7d2a127

Browse files
committed
Poll clarification
1 parent 307e529 commit 7d2a127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Net.Sockets/Socket.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7427,7 +7427,7 @@ The maximum length of the pending connections queue is determined automatically.
74277427
<format type="text/markdown"><![CDATA[
74287428

74297429
## Remarks
7430-
The <xref:System.Net.Sockets.Socket.Poll%2A> method checks the state of the <xref:System.Net.Sockets.Socket>. Specify <xref:System.Net.Sockets.SelectMode.SelectRead?displayProperty=nameWithType> for the `selectMode` parameter to determine if the <xref:System.Net.Sockets.Socket> is readable. Specify <xref:System.Net.Sockets.SelectMode.SelectWrite?displayProperty=nameWithType> to determine if the <xref:System.Net.Sockets.Socket> is writable. Use <xref:System.Net.Sockets.SelectMode.SelectError?displayProperty=nameWithType> to detect an error condition. <xref:System.Net.Sockets.Socket.Poll%2A> will block execution until the specified time period, measured in `microseconds`, elapses. Set the `microSeconds` parameter to a negative integer if you would like to wait indefinitely for a response. If you want to check the status of multiple sockets, you might prefer to use the <xref:System.Net.Sockets.Socket.Select%2A> method.
7430+
The <xref:System.Net.Sockets.Socket.Poll%2A> method checks the state of the <xref:System.Net.Sockets.Socket>. Specify <xref:System.Net.Sockets.SelectMode.SelectRead?displayProperty=nameWithType> for the `selectMode` parameter to determine if the <xref:System.Net.Sockets.Socket> is readable. Specify <xref:System.Net.Sockets.SelectMode.SelectWrite?displayProperty=nameWithType> to determine if the <xref:System.Net.Sockets.Socket> is writable. Use <xref:System.Net.Sockets.SelectMode.SelectError?displayProperty=nameWithType> to detect an error condition. <xref:System.Net.Sockets.Socket.Poll%2A> will block execution until the specified time period, measured in `microseconds`, elapses or data becomes available. Set the `microSeconds` parameter to a negative integer if you would like to wait indefinitely for a response. If you want to check the status of multiple sockets, you might prefer to use the <xref:System.Net.Sockets.Socket.Select%2A> method.
74317431

74327432
> [!NOTE]
74337433
> If you receive a <xref:System.Net.Sockets.SocketException>, use the <xref:System.Net.Sockets.SocketException.ErrorCode%2A?displayProperty=nameWithType> property to obtain the specific error code. After you have obtained this code, refer to the [Windows Sockets version 2 API error code](/windows/desktop/winsock/windows-sockets-error-codes-2) documentation for a detailed description of the error.
@@ -7488,7 +7488,7 @@ The maximum length of the pending connections queue is determined automatically.
74887488
<param name="timeout">The time to wait for a response.</param>
74897489
<param name="mode">One of the <see cref="T:System.Net.Sockets.SelectMode" /> values.</param>
74907490
<summary>Determines the status of the <see cref="T:System.Net.Sockets.Socket" />.</summary>
7491-
<returns>The status of the <see cref="T:System.Net.Sockets.Socket" /> based on the polling mode value passed in the <paramref name="mode" /> parameter.
7491+
<returns>The status of the <see cref="T:System.Net.Sockets.Socket" /> based on the polling mode value passed in the <paramref name="mode" /> parameter. Returns <see langword="true" /> if any of the following conditions occur before the <paramref name="timeout" /> expires, otherwise, <see langword="false" />.
74927492
<ul><li>For <see cref="F:System.Net.Sockets.SelectMode.SelectRead" />, it returns <see langword="true" /> if <see cref="M:System.Net.Sockets.Socket.Listen" /> has been called and a connection is pending, if data is available for reading, or if the connection has been closed, reset, or terminated.</li><li>For <see cref="F:System.Net.Sockets.SelectMode.SelectWrite" />, it returns <see langword="true" /> if processing a <see cref="Overload:System.Net.Sockets.Socket.Connect" /> and the connection has succeeded or if data can be sent.</li><li>For <see cref="F:System.Net.Sockets.SelectMode.SelectError" />, it returns <see langword="true" /> if processing a <see cref="Overload:System.Net.Sockets.Socket.Connect" /> that does not block and the connection has failed, or if <see cref="F:System.Net.Sockets.SocketOptionName.OutOfBandInline" /> is not set and out-of-band data is available.</li><li>Otherwise, it returns <see langword="false" />.</li></ul></returns>
74937493
<remarks>To be added.</remarks>
74947494
<exception cref="T:System.ArgumentOutOfRangeException">

0 commit comments

Comments
 (0)