-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix #7415 System.Net.Sockets.Socket.Receive code example does not work. #7417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsSummaryFix The original example does not work because it uses Fixes #7415
|
Docs Build status updates of commit f1a1029: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
samples/snippets/csharp/VS_Snippets_Remoting/Socket_Sync_Send_Receive/CS/source.cs
Outdated
Show resolved
Hide resolved
Docs Build status updates of commit 5991939: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks.
@dotnet/docs what needs to be done re: this build failure? |
We recently added a requirement for a project file so we can build the snippet. Simply add a .csproj file to the directory with the snippet and add the following content:
|
This comment has been minimized.
This comment has been minimized.
Docs Build status updates of commit 7739db2: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @Dixin !
Summary
Fix
System.Net.Sockets.Socket
class'sReceive
method code example (https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.receive).The original example does not work because it uses
Socket.Available
, which is 0 initially. You have to wait until the data is received, thenSocket.Available
will be the correct value.Fixes #7415