Skip to content

Commit 87cf96f

Browse files
authored
Fix up Socket.Poll return value table to match other overload (#8321)
1 parent 1eaac15 commit 87cf96f

File tree

1 file changed

+7
-36
lines changed

1 file changed

+7
-36
lines changed

xml/System.Net.Sockets/Socket.xml

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7595,40 +7595,13 @@ The maximum length of the pending connections queue is determined automatically.
75957595
<param name="mode">One of the <see cref="T:System.Net.Sockets.SelectMode" /> values.</param>
75967596
<summary>Determines the status of the <see cref="T:System.Net.Sockets.Socket" />.</summary>
75977597
<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.
7598-
7599-
<list type="table"><listheader><term> Mode
7600-
7601-
</term><description> Return Value
7602-
7603-
</description></listheader><item><term><see cref="F:System.Net.Sockets.SelectMode.SelectRead" /></term><description><see langword="true" /> if <see cref="M:System.Net.Sockets.Socket.Listen(System.Int32)" /> has been called and a connection is pending;
7604-
7605-
-or-
7606-
7607-
<see langword="true" /> if data is available for reading;
7608-
7609-
-or-
7610-
7611-
<see langword="true" /> if the connection has been closed, reset, or terminated;
7612-
7613-
otherwise, returns <see langword="false" />.
7614-
7615-
</description></item><item><term><see cref="F:System.Net.Sockets.SelectMode.SelectWrite" /></term><description><see langword="true" />, if processing a <see cref="M:System.Net.Sockets.Socket.Connect(System.Net.EndPoint)" />, and the connection has succeeded;
7616-
7617-
-or-
7618-
7619-
<see langword="true" /> if data can be sent;
7620-
7621-
otherwise, returns <see langword="false" />.
7622-
7623-
</description></item><item><term><see cref="F:System.Net.Sockets.SelectMode.SelectError" /></term><description><see langword="true" /> if processing a <see cref="M:System.Net.Sockets.Socket.Connect(System.Net.EndPoint)" /> that does not block, and the connection has failed;
7624-
7625-
-or-
7626-
7627-
<see langword="true" /> if <see cref="F:System.Net.Sockets.SocketOptionName.OutOfBandInline" /> is not set and out-of-band data is available;
7628-
7629-
otherwise, returns <see langword="false" />.
7630-
7631-
</description></item></list></returns>
7598+
<ul>
7599+
<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>
7600+
<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>
7601+
<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>
7602+
<li>Otherwise, it returns <see langword="false" />.</li>
7603+
</ul>
7604+
</returns>
76327605
<remarks>
76337606
<format type="text/markdown"><![CDATA[
76347607

@@ -7644,8 +7617,6 @@ The maximum length of the pending connections queue is determined automatically.
76447617
> [!NOTE]
76457618
> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in .NET Framework](/dotnet/framework/network-programming/network-tracing).
76467619

7647-
7648-
76497620
## Examples
76507621
The following code example creates a socket, connects to a server, and uses <xref:System.Net.Sockets.Socket.Poll%2A> to check the status of the socket.
76517622

0 commit comments

Comments
 (0)