6#include "../../threading/manual_reset_event.hpp"
7#include "../../iequatable.hpp"
43 explicit async_result_socket(std::any async_state) : async_state_(async_state) {}
44 std::any async_state()
const noexcept override {
return async_state_;}
46 bool completed_synchronously()
const noexcept override {
return false;}
47 bool is_completed()
const noexcept override {
return is_completed_;};
49 std::any async_state_;
50 bool is_completed_ =
false;
53 std::exception_ptr exception_;
56 class async_result_accept_socket :
public async_result_socket {
58 explicit async_result_accept_socket(std::any async_state) : async_result_socket(async_state) {}
62 class async_result_accept_tcp_client :
public async_result_socket {
64 explicit async_result_accept_tcp_client(std::any async_state) : async_result_socket(async_state) {}
210 using
object::equals;
211 bool equals(const
tcp_listener& s) const noexcept override;
238 void start(
size_t backlog);
265 bool active() const noexcept;
Represents the status of an asynchronous operation.
Definition iasync_result.hpp:25
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Identifies a network address. This is an abstract class.
Definition end_point.hpp:27
Provides an Internet Protocol (IP) address.
Definition ip_address.hpp:37
Represents a network endpoint as an IP address and a port number.
Definition ip_end_point.hpp:23
Implements the Berkeley sockets interface.
Definition socket.hpp:74
Provides client connections for TCP network services.
Definition tcp_client.hpp:48
Listens for connections from TCP network clients.
Definition tcp_listener.hpp:40
bool exclusive_address_use() const
Gets a bool value that specifies whether the xtd::net::sockets::tcp_listener allows only one underlyi...
tcp_listener & exclusive_address_use(bool value)
Sets a bool value that specifies whether the xtd::net::sockets::tcp_listener allows only one underlyi...
const xtd::net::end_point & local_end_point() const noexcept
Gets the underlying xtd::net::end_point of the current xtd::net::sockets::tcp_listener.
tcp_listener(const xtd::net::ip_address &ip_address, uint16 port)
Initializes a new instance of the xtd::net::sockets::tcp_listener class that listens for incoming con...
tcp_listener(const xtd::net::ip_end_point &local_end_point)
Initializes a new instance of the xtd::net::sockets::tcp_listener class with the specified local endp...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
Represents a thread synchronization event that, when signaled, must be reset manually....
Definition manual_reset_event.hpp:35
Encapsulates operating system specific objects that wait for exclusive access to shared resources.
Definition wait_handle.hpp:52
#define core_export_
Define shared library export.
Definition core_export.hpp:13
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
socket_error
Defines error codes for the xtd::net::sockets::socket class.
Definition socket_error.hpp:30
xtd::sptr< xtd::iasync_result > async_result
Represents the status of an asynchronous operation.
Definition async_result.hpp:19
delegate< void(async_result ar)> async_callback
References a method to be called when a corresponding asynchronous operation completes.
Definition delegate.hpp:36
@ success
Operation successful.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::net::sockets::tcp_client class.