devin
devin

Reputation: 6527

Resource temporarily unavailable in Boost ASIO

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.

Upvotes: 2

Views: 2559

Answers (1)

DaveR
DaveR

Reputation: 9640

"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.

Upvotes: 4

Related Questions