Boost logo

Boost Users :

Subject: [Boost-users] "event-driven" async-receive
From: Alexander Carôt (Alexander_Carot_at_[hidden])
Date: 2014-10-23 04:53:50


Hello all,

I have question regarding the async_receive_from – operation (using UDP):

Right now I have a thread, which triggers the receive call in constant
intervals. This works allright if the sender sends data in the same interval
or larger intervals.

However, if the send intervals are (much) smaller (or if multiple senders
exist) the receive-operation is not triggered often enough.

Eventually I’d like the receiving socket to behave in an „event-driven
“ manner – so, whenever data is there the receive-handler should be invoked.

I used to work with Qt, which works this way (via signals/slots) but since I
moved to boost I wonder how I can reproduce this behavior.

Can anyone tell how to approach this ?

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