|
Boost Users : |
Subject: Re: [Boost-users] asio UDP message packet loss even on localhost?
From: Ãkos Maróy (akos_at_[hidden])
Date: 2010-10-22 10:54:47
Yuri,
> 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.
good point. as just stated in the earlier mail, this code was a leftover
from a sample I started out with. now having removed it seems to have
solved my problem.
thanks,
Akos
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