bool xtd::net::sockets::socket::poll | ( | int32 | micro_seconds, |
xtd::net::sockets::select_mode | mode | ||
) |
Determines the status of the xtd::net::sockets::socket.
micro_seconds | The time to wait for a response, in microseconds. |
mode | One of the xtd::net::sockets::select_mode values. |
Mode | Return Value |
---|---|
xtd::net::sockets::select_mode::select_read | true if xtd::net::sockets::socket::listen has been called and a connection is pending; -or- true if data is available for reading; -or- true if the connection has been closed, reset, or terminated; otherwise, returns false. |
xtd::net::sockets::select_mode::select_write | true, if processing a xtd::net::sockets::socket::connect, and the connection has succeeded; -or- true if data can be sent; otherwise, returns false. |
xtd::net::sockets::select_mode::select_error | true if processing a xtd::net::sockets::socket::connect that does not block, and the connection has failed; -or- true if xtd::net::sockets::socket_option_name::out_of_band_inline is not set and out-of-band data is available; otherwise, returns false. |
xtd::net::sockets::socket_exception | An error occurred when attempting to access the socket. |
xtd::object_closed_exception | The xtd::net::sockets::socket has been closed. |