Boost logo

Boost Users :

Subject: [Boost-users] async_send handler problem
From: Alexander Carôt (Alexander_Carot_at_[hidden])
Date: 2013-12-13 19:08:08


Hello all,

I am new to boost and asio in particular. For now I am implementing a simple
UDP sender.

The sending process itself works fine but for some reason the send handler
does not execute. The call itself looks like this:

In my class sender.cpp I have a functions called

void sender::sendIt(){

sj->dFC->s->async_send_to(boost::asio::buffer(

this->charBuffer,sendBytes),

*sj->dFC->e,

boost::bind(&sender::sendHandler,this,

boost::asio::placeholders::error,

boost::asio::placeholders::bytes_transferred);

}

and the corresponding handler is this:

void sender::sendHandler(const boost::system::error_code& error,std::size_t
bytes_transferred){

cout << "TRIGGER" << endl;

}

Can anyone give me a hint what the reason for the not-working handler might
be ?

Thanks in advance,

best

Alex

 



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