$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] async_send handler problem
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-12-16 13:15:21
On 12/16/2013 06:51 PM, Alexander Carôt wrote:
> void sender::sendIt(char *charBuffer){
[...]
> sj->dFC->io_service.run();
You should not call io_service::run() inside this function. The normal
pattern is to set up your network code, e.g. from main(), and then call
run() after setup. This call will block (and all Asio callbacks will be
executed from this thread.) If you do not want your main thread to
handle the network code, then you can launch in a separate thread (as
previously suggested.)