We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current implementation recvfrom() has no possibility to exit after the timeout, but Linux socket has option SO_RCVTIMEO
https://linux.die.net/man/7/socket
Usage:
struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 100000; if (setsockopt(rcv_sock, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) < 0) { perror("Error"); } if(recvfrom(rcv_sock, ackBuffer,sizeof(ackBuffer), 0, (struct sockaddr *) &servAddr2, &fromSize) < 0){ //timeout reached ... }
The text was updated successfully, but these errors were encountered:
I have no objections to this feature. Are you planning to implement this or do you wish that someone else would do the work?
Sorry, something went wrong.
Actually I have no plans to implement this, but I strictly need any solution to correctly shut down the receiving socket after timeout.
The SO_RCVTIMEO options was just implemented by #31369 so closing this one.
No branches or pull requests
Current implementation recvfrom() has no possibility to exit after the timeout, but Linux socket has option SO_RCVTIMEO
https://linux.die.net/man/7/socket
Usage:
The text was updated successfully, but these errors were encountered: