Gheorghe Marinca
2012-09-03 18:50:54 UTC
Hy,
I use the same socket in my udp server in order to receive data from
clients on some port, and later after processing of requests respond to to
clients using ip::ud::socket
::*async_send_to*<http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/reference/basic_datagram_socket/async_send_to.html>
Receive is done async with
*async_receive_from*<http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/reference/basic_datagram_socket/async_receive_from.html>also.
The socket uses same ioService (it's the same socket after all)
The documentation does not state clearly if one can have at a moment the
same udp socket receive datagrams from client A (in async way) and possibly
send another datagram to client B (async sent) at the same time
I suspect this could lead to problems though and any input is appreciated.
I ended up using same socket for replay because I could not bind another
socket to the same server port while replaying to another client.
I use the same socket in my udp server in order to receive data from
clients on some port, and later after processing of requests respond to to
clients using ip::ud::socket
::*async_send_to*<http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/reference/basic_datagram_socket/async_send_to.html>
Receive is done async with
*async_receive_from*<http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/reference/basic_datagram_socket/async_receive_from.html>also.
The socket uses same ioService (it's the same socket after all)
The documentation does not state clearly if one can have at a moment the
same udp socket receive datagrams from client A (in async way) and possibly
send another datagram to client B (async sent) at the same time
I suspect this could lead to problems though and any input is appreciated.
I ended up using same socket for replay because I could not bind another
socket to the same server port while replaying to another client.