[ASIO] when does basic_datagram::async_read() call the handler?
Hello, For the function basic_datagram::async_read() the asio documentation states: "The handler to be called when the receive operation completes." Does that occur when a UDP datagram is received in full or the buffer has filled? I'm just concerned that it might insert into the buffer more than one UDP datagram before calling the handler or a non-complete UDP datagram. I wanted to use the async_read_until but it states that its for streams, which makes sense if the basic_datagram::async_read function returns on a per complete datagram basis. I'm also assuming large UDP datagrams (that take up multiple packets) will be collected by the transport layer before being presented to the application layer (though this is not so much an Asio question as it is a Linux network stack question). thanks a lot! jose "survival first, then happiness as we can manage it"
participants (1)
-
Jose Martinez