Closed peterchen25 closed 2 years ago
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));
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