xtd::sptr< xtd::iasync_result > xtd::net::sockets::socket::begin_accept | ( | xtd::async_callback | callback, |
const std::any & | state | ||
) |
Begins an asynchronous operation to accept an incoming connection attempt.
callback | The xtd::async_callback delegate. |
state | An object that contains state information for this request. |
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(). |
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(). |