Hi,
My program needs a sync udp socket send / receiver so I use the deadline_timer as timeout for udp socket receive_from on Debian Jessie:
boost::asio::deadline_timer deadline(io_service, boost::posix_time::seconds(2));
In checkDeadline function, when the timer expires, it calls socket.cancel, otherwise calls the deadline.async_wait(
checkDeadline); again.
Apparently when the program runs to socket.receive_from(), it is blocked and the timer is never called because both socket.receive_from and the timer in the same thread.