-
Notifications
You must be signed in to change notification settings - Fork 195
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
How to set timeout for connect? #76
Comments
The easiest way is to use the isReadableOrWritable function. The basic steps are as follows:
|
I tried but the same problem occurs.The problem what I am facing is when the socket.connect(ip, port) starts executing it waits for some time to connect. |
here is the code!!
|
i tried but it still waits in socket?.connect(to: ip , port: Int32(port)) |
I can confirm the same behaviour for me on Darwin, see https://github.com/mna/testconnecttimeout to reproduce. Blocks on the call to |
Fixed in 0.12.60. |
I need to set timeout for socket.connect(ip ,port) how can I do it?
The text was updated successfully, but these errors were encountered: