简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM