Boost asio lib question: async_accept and EBADF
18 Apr
2011
18 Apr
'11
7:07 a.m.
Cheers, I have a question regarding handling error bad file descriptor in asio async_accept. Standard example doesn't expose whether it's fatal or not. If I understand correctly bad_descriptor error is not fatal here, like it would be for usual POSIX accept() call, and we should continue accepting new incoming calls, no? void handle_accept(tcp_connection::pointer new_connection, const boost::system::error_code& error) { if (!error) { new_connection->start(); start_accept(); } } e.g. if (!error) { new_connection->start(); start_accept(); } else if (error == bad_descriptor) { start_accept(); } -- King regards, Oleh
4955
Age (days ago)
4955
Last active (days ago)
0 comments
1 participants
participants (1)
-
olegb@it-forces.com