Skip to content
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

Change IAsyncResult APIs in System.Net.Sockets to wrap Task APIs #43845

Closed
9 tasks done
geoffkizer opened this issue Oct 26, 2020 · 4 comments
Closed
9 tasks done

Change IAsyncResult APIs in System.Net.Sockets to wrap Task APIs #43845

geoffkizer opened this issue Oct 26, 2020 · 4 comments
Assignees
Labels
area-System.Net.Sockets enhancement Product code improvement that does NOT require public API changes/additions help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@geoffkizer
Copy link
Contributor

geoffkizer commented Oct 26, 2020

We should change all the old IAsyncResult APIs in System.Net.Sockets to simply wrap the equivalent Task APIs, as we do in general.

Unfortunately, some of the current Task APIs actually use these IAsyncResult APIs. There is planned work to change this.

Specifically, we should do this for the following Socket APIs:

And these UdpClient APIs:

- [ ] [Begin/End]Send
- [ ] [Begin/End]Receive

EDIT (by @antonfirsov )

As per #43845 (comment), we don't need to do anything with UdpClient.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net.Sockets untriaged New issue has not been triaged by the area owner labels Oct 26, 2020
@ghost
Copy link

ghost commented Oct 26, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@antonfirsov
Copy link
Member

antonfirsov commented Feb 5, 2021

And these UdpClient APIs: [...]

@geoffkizer I'm not sure what do you mean by those work items. UdpClient's [Begin/End][Receive/Send] methods are thin wrappers over the Socket counterparts. You say it's worth to refactor them to wrap their own Task-based methods instead?

@geoffkizer
Copy link
Contributor Author

UdpClient's [Begin/End][Receive/Send] methods are thin wrappers over the Socket counterparts. You say it's worth to refactor them to wrap their own Task-based methods instead?

No, you're right, I don't think we actually need to refactor these. I probably didn't look closely at what they do when I added them to the list.

antonfirsov added a commit that referenced this issue Feb 9, 2021
…idate related tests (#47781)

Contributes to #43845. Reimplements (Begin|End)(SendTo|ReceiveFrom|ReceiveMessageFrom) on top of the new Task-based variants, and deletes unused code. Moves all related argument validation tests from ArgumentValidationTests.cs to SendTo.cs, ReceiveFrom.cs and ReceiveMessageFrom.cs, and extends coverage.
@karelz
Copy link
Member

karelz commented May 13, 2021

Seems to be finished, closing.

@karelz karelz closed this as completed May 13, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Sockets enhancement Product code improvement that does NOT require public API changes/additions help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

No branches or pull requests

4 participants