Boost logo

Boost Users :

Subject: [Boost-users] tcp error “more data is available”
From: herzl&revital sham (herzlrevital_at_[hidden])
Date: 2011-12-29 09:06:01


I build a sync udp server via boost::asio follow bellow

I bind to interface

    Socket.open(EndPoint.protocol());
    Socket.set_option(boost::asio::ip::udp::socket::reuse_address(true));
    Socket.bind(EndPoint);

and read

  char mybuffer[1450];

  Socket.async_receive_from(
      boost::asio::buffer(mybuffer, 1450),
      senderEndpoint_,
      boost::bind(&MsgReceiver::HandleReceive,
      this,
      boost::asio::placeholders::error,
      buffer,
      boost::asio::placeholders::bytes_transferred)
      );

then i send data to this server like below:

yes "AAAAAAAAAAAAAAAAAaaAAAAAAA" | nc -u 172.16.0.12 1234

I get "more data is available" error message in HandleReceive and my
system Crashes.

I debugger this is all io_services status

 0  >   5768    Worker Thread   _threadstartex
boost::asio::detail::win_iocp_io_service::work_finished Normal  0


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