
22 Oct
2010
22 Oct
'10
2:54 p.m.
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