Timeout on Socket.Connect #45426
Answered
by
stephentoub
cincuranet
asked this question in
Q&A
-
Hi. What's the recommended approach nowadays when you want to have "connect timeout" aka timeout on |
Beta Was this translation helpful? Give feedback.
Answered by
stephentoub
Dec 1, 2020
Replies: 1 comment 5 replies
-
You can pass a CancellationToken to Socket.ConnectAsync. That token can have cancellation requested manually or via a timer. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
cincuranet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass a CancellationToken to Socket.ConnectAsync. That token can have cancellation requested manually or via a timer.