Skip to content

Commit 3614685

Browse files
committed
The Socket.Select documentation for the overload where timeout is a
`System.TimesSpan` states that `ArgumentNullException` is thrown if any of checkRead, checkWrite or checkError is empty/null. But, null or empty collections can be passed for them. The real requirement is that at least one of them must contain at least one socket. It is perfectly okay to `select(read_sockets, NULL, NULL)` or `select(NULL, write_sockets, NULL)` or `select(NULL, NULL, error_sockets)`.
1 parent 691a300 commit 3614685

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

xml/System.Net.Sockets/Socket.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11054,11 +11054,13 @@ You must call the Bind method before performing this operation.</exception>
1105411054

1105511055
-and-
1105611056

11057-
The <paramref name="checkWrite" /> parameter is <see langword="null" /> or empty
11057+
The <paramref name="checkWrite" /> parameter is <see langword="null" /> or empty
1105811058

1105911059
-and-
1106011060

11061-
The <paramref name="checkError" /> parameter is <see langword="null" /> or empty.</exception>
11061+
The <paramref name="checkError" /> parameter is <see langword="null" /> or empty.
11062+
11063+
At least one of <paramref name="checkRead" />, <paramref name="checkWrite" /> and <paramref name="checkError" /> must contain at least one <see cref="Socket"/>.</exception>
1106211064
<exception cref="T:System.Net.Sockets.SocketException">An error occurred when attempting to access the socket.</exception>
1106311065
<exception cref="T:System.ObjectDisposedException">.NET 5 and later: One or more sockets are disposed.</exception>
1106411066
<altmember cref="T:System.Collections.IList" />
@@ -11113,8 +11115,18 @@ You must call the Bind method before performing this operation.</exception>
1111311115
<param name="timeout">The timeout value. A value equal to -1 microseconds indicates an infinite timeout.</param>
1111411116
<summary>Determines the status of one or more sockets.</summary>
1111511117
<remarks>To be added.</remarks>
11116-
<exception cref="T:System.ArgumentNullException">The <paramref name="checkRead" />, <paramref name="checkWrite" />, or <paramref name="checkError" /> parameter is <see langword="null" /> or empty.</exception>
11117-
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="checkRead" />, <paramref name="checkWrite" />, or <paramref name="checkError" /> parameter contains too many sockets.</exception>
11118+
<exception cref="T:System.ArgumentNullException">The <paramref name="checkRead" /> parameter is <see langword="null" /> or empty.
11119+
11120+
-and-
11121+
11122+
The <paramref name="checkWrite" /> parameter is <see langword="null" /> or empty
11123+
11124+
-and-
11125+
11126+
The <paramref name="checkError" /> parameter is <see langword="null" /> or empty.
11127+
11128+
At least one of <paramref name="checkRead" />, <paramref name="checkWrite" /> and <paramref name="checkError" /> must contain at least one <see cref="Socket"/>.</exception>
11129+
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="checkRead" />, <paramref name="che^ckWrite" />, or <paramref name="checkError" /> parameter contains too many sockets.</exception>
1111811130
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="timeout" /> was less than -1 microseconds or greater than <see cref="F:System.Int32.MaxValue" /> microseconds</exception>
1111911131
<exception cref="T:System.Net.Sockets.SocketException">An error occurred when attempting to access the socket.</exception>
1112011132
<exception cref="T:System.ObjectDisposedException">One or more sockets was disposed.</exception>

0 commit comments

Comments
 (0)