boost::corosio::udp_socket::send_to

Send a datagram to the specified destination.

Synopses

template<capy::ConstBufferSequence Buffers>
[[nodiscard]]
auto
send_to(
    Buffers const& buf,
    endpoint dest);

Send a datagram to the specified destination.

template<capy::ConstBufferSequence Buffers>
[[nodiscard]]
auto
send_to(
    Buffers const& buf,
    endpoint dest,
    corosio::message_flags flags);

Return Value

An awaitable that completes with io_result<std::size_t>.

The return value should not be discarded.

Parameters

Name

Description

buf

The buffer containing data to send.

dest

The destination endpoint.

flags

Message flags (e.g. message_flags::do_not_route).

Created with MrDocs