xtd 0.2.0
Loading...
Searching...
No Matches

◆ is_bound()

bool xtd::net::sockets::socket::is_bound ( ) const
noexcept

Gets a value that indicates whether the xtd::net::sockets::socket is bound to a specific local port.

Returns
true if the xtd::net::sockets::socket is bound to a local port; otherwise, false.
Remarks
A socket is considered bound to a local port if it is explicitly bound by calling the xtd::net::sockets::socket::bind method, or implicitly bound by calling members like xtd::net::sockets::socket::connect, xtd::net::sockets::socket::send_to, or xtd::net::sockets::socket::receive_from, which use an ephemeral local port (a free port greater than 1024, selected by the operating system.) Servers use the xtd::net::sockets::socket::bind method to bind to a well-known port so that clients may connect to them.