I need an advice with the situation
I'm doing a udp async multicast transiver:
- he can accepts data from multicast group
- he can send data to multicast group
Data is sent in the following cases:
- async_receive_from -> callback -> async_send (in the same thread)
- by external timer -> async_send(in another thread)
I use one socket for receive and send. Do I need synchronize async_receive_from and async_send_to from external timer? booast::asio doc says that objects are unsafe. My solution is use a ioserivce post/dispatch for external timer data, that async_send_to call in the same thread
If I make two sockets - one for read, one for thread, who works this one multicast groud. Do I need synchronize this?
P.S. I'm using one thread ioservice::run