![]() |
Home | Libraries | People | FAQ | More |
Receive multiple datagrams and their flags with the sender endpoints.
template< typename MutableBufferSequences, typename MutableEndpointSequence, typename MutableSizeSequence, typename MutableFlagsSequence> std::size_t receive_from_multiple( MutableBufferSequences && buffer_sequences, MutableEndpointSequence && endpoints, MutableSizeSequence && sizes, MutableFlagsSequence && out_flags, constraint_t< is_shallow_mutable_sequence< decay_t< MutableFlagsSequence > >::value > = 0);
This function is used to receive multiple datagrams, recording the endpoint of the remote sender of each. The function call will block until one or more datagrams have been received successfully or an error occurs. The number of datagrams transferred may be less than the length of the shortest range.
A forward range of mutable buffer sequences, one per datagram, into which the data will be received.
A forward range of endpoint objects, one per datagram, that receive the endpoint of the remote sender of each datagram.
A forward range of std::size_t,
one per datagram, into which the number of bytes received in each
datagram is written.
A forward range of socket_base::message_flags,
one per datagram, into which the flags associated with each received
datagram are written.
The number of datagrams received.
Thrown on failure.