
Hi Etienne - Etienne Philip Pretorius wrote:
Hello list,
Could someone please shed some light on this subject. It seems that me read handler keeps on being called even when there has been no data transferred...
switch(error.value()) { case boost::system::posix_error::success: { c = new client();
socket.async_receive( boost::asio::buffer( buffer ),boost::bind( &client::handle_read, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred ) );
Try changing this to use socket.async_read_some instead of async_receive. Regards - michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com