boost::corosio::udp_socket::send_to

Send a datagram to the specified destination.

Synopses

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

Send a datagram to the specified destination.

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

Exceptions

Name

Thrown on

std::logic_error

if the socket is not open.

Return Value

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

Parameters

Name

Description

buf

The buffer containing data to send.

dest

The destination endpoint.

flags

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

Created with MrDocs