c++ - async_read_some return -
is there way in boost::asio know if async_read_some
wont return in particular time period call function without closing socket? async_read_some()
wont return if there no more data transfered buffer.
_socket->async_read_some( boost::asio::buffer(this->reply, sizeof(this>reply)), boost::bind( &tcp_ip_connection::dataprocess, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred ) );
async_read_some
returns immediately.
if you're talking handler (callback), if close socket before returns, think handler gets called asio::error::operation_aborted
. if handle scenario maybe don't need worry if you're connected or not.
Comments
Post a Comment