16 Dec
2013
16 Dec
'13
6:15 p.m.
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.)