I'm going through boost::asio and there is something I can't figure out: how to call a method when data becomes available in the socket?
If I understand correctly async_read(...) will read data from the socket and call its delegate when the reading has been done. In that case, how do I know data is available for reading? Do I always need to sleep and check?
Aucun commentaire:
Enregistrer un commentaire