Question

I get the error message "Resource temporarily unavailable" when I use the method receive_from(), it's a member of ip::udp::socket located here.

I pass to it: boost::asio::buffer, pointer to an endpoint object, flags (set to zero), and an error_code object.

I create the endpoint with just

 new udp::endpoint()

There doesn't seem to be too much information available on this error message too. I've tried it on several machines and always get this error.

Was it helpful?

Solution

"Resource temporarily unavailable" is normally the text description for EAGAIN, indicating that the operation should be retried. In the case of UDP, it indicates that there isn't any data available at present, and you should try later.

It's generally worth looking at the man page for the underlying libc function; which is recvfrom in this case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top