Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Callbacks not getting called
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-12 09:43:19


Tom Kent wrote:

>
> So, I tried it, but surprisingly, it didn't make any difference. I'm
> not sure why there wasn't an error, it seems like one of HandleAccept
> and &HandleAccept would cause some type of error.
>
> Also, I'm not having the problem getting through the acceptor. The
> server successfully gets the accept callback for the connection from the
> client (and the client gets its callback as well). Its the
> aysnc_send/async_read that doesn't ever get a callback. I tried using
> the reference to HandleAccept in those as well, but like I said above,
> saw the *exact* same results.
>
> Tom
>

As Igor suggested, the io_service running your client runs out of work after
connecting. In addition, you should replace

      gotTransfer_;
by
      gotTransfer_ = true;

Cheers,

Rutger


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