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

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries outerloop

@azure-pipelines

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

@stephentoubstephentoub 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 threadsrc/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs Outdated
Comment threadsrc/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs Outdated
Comment threadsrc/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 threadsrc/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs Outdated
@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries outerloop

@azure-pipelines

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

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries outerloop

@azure-pipelines

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

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

@stephentoubstephentoub 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
geoffkizerforce-pushed the connectasynccancellation branch from 150219b to 0aa6f16CompareAugust 15, 2020 02:43
@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

I also modified SocketConnectionFactory to use the new ConnectAsync API.

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries outerloop

@azure-pipelines

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

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries outerloop

@azure-pipelines

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

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

/azp run runtime-libraries outerloop

@azure-pipelines

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

@MartyIX

Copy link
Copy Markdown
Contributor

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

@geoffkizer

Copy link
Copy Markdown
ContributorAuthor

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
@ghostghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for freeto 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

@geoffkizer@Dotnet-GitSync-Bot@antonfirsov@MartyIX@stephentoub