6 #include "../../threading/manual_reset_event.h" 7 #include "../../iequatable.h" 41 explicit async_result_socket(
std::any async_state) : async_state_(async_state) {}
42 std::any async_state()
const noexcept
override {
return async_state_;}
44 bool completed_synchronously()
const noexcept
override {
return false;}
45 bool is_completed()
const noexcept
override {
return is_completed_;};
48 bool is_completed_ =
false;
51 std::exception_ptr exception_;
54 class async_result_accept_socket :
public async_result_socket {
56 explicit async_result_accept_socket(
std::any async_state) : async_result_socket(async_state) {}
60 class async_result_accept_tcp_client :
public async_result_socket {
62 explicit async_result_accept_tcp_client(
std::any async_state) : async_result_socket(async_state) {}
240 void start(
size_t backlog);
258 bool active()
const noexcept;
262 std::shared_ptr<data> data_;
Implements the Berkeley sockets interface.
Definition: socket.h:71
Provides an Internet Protocol (IP) address.
Definition: ip_address.h:35
delegate< void(async_result ar)> async_callback
References a method to be called when a corresponding asynchronous operation completes.
Definition: delegate.h:34
Represents the status of an asynchronous operation.
Definition: iasync_result.h:22
Identifies a network address. This is an abstract class.
Definition: end_point.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::shared_ptr< xtd::iasync_result > async_result
Represents the status of an asynchronous operation.
Definition: async_result.h:16
Enables a socket to be bound for exclusive access.
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition: types.h:228
Represents a network endpoint as an IP address and a port number.
Definition: ip_end_point.h:21
socket_error
Defines error codes for the xtd::net::sockets::socket class.
Definition: socket_error.h:28
Provides client connections for TCP network services.
Definition: tcp_client.h:46
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
Contains xtd::net::sockets::tcp_client class.
Listens for connections from TCP network clients.
Definition: tcp_listener.h:38
Represents a thread synchronization event that, when signaled, must be reset manually. This class cannot be inherited.
Definition: manual_reset_event.h:33
Encapsulates operating system specific objects that wait for exclusive access to shared resources...
Definition: wait_handle.h:48