Documentation fix for Socket.Select#102963
Conversation
The Socket.Select documentation 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)`.
|
Tagging subscribers to this area: @dotnet/ncl |
|
If you want this to get into official docs, you also need to update it in https://github.com/dotnet/dotnet-api-docs. The triple slash comments are used only for initial docs import for new APIs. cc @antonfirsov |
|
It may be worth of doing the api-docs first to nail down working with docs people. |
|
@logiclrd can you please open a PR against https://github.com/dotnet/dotnet-api-docs? You would need to edit https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Net.Sockets/Socket.xml. If you feel it's too much of burden feel free to open an issue instead of a PR describing your recommendation. Closing, since this repo is not he source of truth for the docs. |
|
Okay :-) Thanks. |
|
If a PR gets accepted there, will it update the docs here, or do they need to be updated here too even though it's not the source of truth? |
I must admit that I'm confused about the synchronization process myself, but I believe we don't do it with small manual PR-s. @carlossanlop can you give some hints? |
The Socket.Select documentation states that
ArgumentNullExceptionis thrown if any ofcheckRead,checkWriteorcheckErroris 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 toselect(read_sockets, NULL, NULL)orselect(NULL, write_sockets, NULL)orselect(NULL, NULL, error_sockets).