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