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

Socket Timeout #33

Closed
peterchen25 opened this issue Dec 1, 2020 · 1 comment
Closed

Socket Timeout #33

peterchen25 opened this issue Dec 1, 2020 · 1 comment

Comments

@peterchen25
Copy link

Socket timeouts are not set, therefore the connect could get stuck in case of bad ip or drop of network connection.
Suggestion:
After creating the socket

struct timeval timeout{TIMEOUT_S,TIMEOUT_US};
setsockopt (sock, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout,sizeof(timeout));
@orca-zhang
Copy link
Owner

#40 maybe solved this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants