Skip to content

implement ConnectAsync overloads with CancellationToken on Socket and TcpClient#40750

Merged
geoffkizer merged 8 commits into
dotnet:masterfrom
geoffkizer:connectasynccancellation
Aug 16, 2020
Merged

implement ConnectAsync overloads with CancellationToken on Socket and TcpClient#40750
geoffkizer merged 8 commits into
dotnet:masterfrom
geoffkizer:connectasynccancellation

Conversation

@geoffkizer

Copy link
Copy Markdown
Contributor

Contributes to #33418

@stephentoub @dotnet/ncl

@Dotnet-GitSync-Bot

Copy link
Copy Markdown
Collaborator

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost

ghost commented Aug 13, 2020

Copy link
Copy Markdown

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

@geoffkizer geoffkizer self-assigned this Aug 13, 2020
@geoffkizer geoffkizer added this to the 5.0.0 milestone Aug 13, 2020
@geoffkizer

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use this now in the connection factory stuff?

Comment thread src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs Outdated
Comment thread src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs Outdated
Comment thread src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs Outdated
@antonfirsov

Copy link
Copy Markdown
Contributor

Can we use this now in the connection factory stuff?

Good question which PR gets merged first. If mine, we can do it in a follow-up PR.

Comment thread src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs Outdated
@geoffkizer

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@geoffkizer

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs Outdated
Comment thread src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs Outdated

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geoffkizer geoffkizer force-pushed the connectasynccancellation branch from 150219b to 0aa6f16 Compare August 15, 2020 02:43
@geoffkizer

Copy link
Copy Markdown
Contributor Author

I also modified SocketConnectionFactory to use the new ConnectAsync API.

@geoffkizer

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@geoffkizer

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@geoffkizer

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MartyIX

MartyIX commented Oct 6, 2020

Copy link
Copy Markdown
Contributor

@geoffkizer Is public Task ConnectAsync(IPEndPoint remoteEP) missing on purpose in TcpClient ?

@geoffkizer

Copy link
Copy Markdown
Contributor Author

I think it just never got added. Feel free to file an issue on it.

@geoffkizer geoffkizer deleted the connectasynccancellation branch November 7, 2020 23:40
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants