xtd::sptr< xtd::iasync_result > xtd::net::sockets::socket::begin_send | ( | const std::vector< xtd::byte > & | buffer, |
size_t | offset, | ||
size_t | size, | ||
xtd::net::sockets::socket_flags | socket_flags, | ||
xtd::async_callback | callback, | ||
const std::any & | state | ||
) |
Sends data asynchronously to a connected xtd::net::sockets::socket::socket.
buffer | An array of type xtd::byte that contains the data to send. |
offset | The zero-based position in the buffer parameter at which to begin sending data. |
size | The number of bytes to send. |
socket_flags | A bitwise combination of the xtd::net::sockets::socket_flags values. |
callback | The xtd::async_callback delegate. |
state | An object that contains state information for this request. |
xtd::argument_out_of_range_exception | size is less than 0 or exceeds the size of the buffer. |
xtd::object_closed_exception | The xtd::net::sockets::socket has been closed. |
xtd::invalid_operation_exception | The accepting socket is not listening for connections. You must call xtd::net::sockets::socket::bind and xtd::net::sockets::socket::listen before calling xtd::net::sockets::socket::accept(). |