jeudi 28 octobre 2021

Asio UDP write from outside read handler

The asio UDP server class has an async read and write function. Everything works fine if I do a write from within the handler of read (e.g.: https://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/tutorial/tutdaytime6/src.html))

I found this link on the web, which mentions:

Send the message to the client using the endpoint as set by receive_from()

(e.g.: http://thisthread.blogspot.com/2018/03/boost-asio-synchronous-udp-clientserver.html)

I want the write to be independent of the read. Is this possible?

Any help would be appreciated.

Aucun commentaire:

Enregistrer un commentaire