Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

recvmmsg and negative nread #177

Open
ethelweston opened this issue Dec 2, 2020 · 2 comments
Open

recvmmsg and negative nread #177

ethelweston opened this issue Dec 2, 2020 · 2 comments

Comments

@ethelweston
Copy link

What's the correct implementation for handling errors when using recvmmsg?

Prior to using recvmmsg, we freed the buffer immediately if nread < 0.

If we're using recvmmsg, should we continue to use this behavior or are we guaranteed to get a return with a NULL address even in the event of a transmission error?

Cheers! recvmmsg is awesome and we're very excited to use it. :-)

@bnoordhuis
Copy link
Member

Yes, nread < 0 is still how you handle that. The docs could be clearer on that point. A PR improving that section would be very welcome.

@ethelweston
Copy link
Author

libuv/libuv#3061 :-)

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

No branches or pull requests

2 participants