|
Boost Users : |
Subject: Re: [Boost-users] asio UDP message packet loss even on localhost?
From: Yuri T. (br0adcast.007_at_[hidden])
Date: 2010-10-22 10:29:24
Hi,
void handle_send_to(const boost::system::error_code& error,
size_t /*bytes_sent*/)
{
if (error) {
std::cout << "send error!" << std::endl;
}
++messages_sent_;
socket_.async_receive_from(
boost::asio::buffer(data_, max_length), sender_endpoint_,
boost::bind(&server::handle_receive_from, this,
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred));
}
2000 times "async_receive_from" in sending server it's not so good, i think.
Without it all work fine.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net