-
Notifications
You must be signed in to change notification settings - Fork 279
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
Question about usrsctp_sendv() error codes EWOULDBLOCK and EAGAIN with non blocking sockets #582
Comments
No, that is basically the reason. Setting the send buffer size also looks correct. |
Thanks, then we are basically not calculating properly (from outside usrsctp) the remaining free send buffer of a socket. If there was a way to know the remaining free buffer before calling We are buffering sending data in higher layers of the app, trying to calculate when there's enough free send buffer in |
SCTP also takes some overhead into account... Would using the |
This may very well respond to the current behaviour. Is that overhead amount something known, or is there a safe percentage of the total configured send buffer we could consider as
Yes, we already do. We use it to calculate the current free buffer. |
No, it is not a specific proportion, but depends on how user messages are broken up in chunks. Any reason why you need the space in the send socket buffer precisely?
|
We want to know when send buffer in We look at send socket buffer because that's what we can control in |
So what you describe is exactly the use case of the |
We do very similarly but I was not 100% sure that after I'll test this and come back with a confirmation in the following days. |
It should work, if not, it is a bug and I would like to know and fix it. |
Closing the issue. We have made the corresponding modification in order to adhere to this comment. It's working as expected so far. Thanks for the help @tuexen. |
Hi,
We're sometimes getting such error codes (not sure which one of them, since we handle both under the same condition) upon calling
usrsctp_sendv
. We are using non blocking sockets.Up to now we are considering that such errors indicate that the send buffer is full. We are setting the send buffer size and also controlling that we are not calling
usrsctp_sendv()
if there is no enough free send buffer.Is there any other reason these return codes?
This is how we set the send buffer size:
Thanks.
The text was updated successfully, but these errors were encountered: