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_;};
47 std::any async_state_;
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) {}
208 bool equals(const
tcp_listener& s) const noexcept override;
235 void start(
size_t backlog);
262 bool active() const noexcept;
266 std::shared_ptr<data> data_;
Represents the status of an asynchronous operation.
Definition iasync_result.h:22
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:18
Identifies a network address. This is an abstract class.
Definition end_point.h:25
Provides an Internet Protocol (IP) address.
Definition ip_address.h:35
Represents a network endpoint as an IP address and a port number.
Definition ip_end_point.h:21
Implements the Berkeley sockets interface.
Definition socket.h:71
Provides client connections for TCP network services.
Definition tcp_client.h:46
Listens for connections from TCP network clients.
Definition tcp_listener.h:38
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.h:32
Represents a thread synchronization event that, when signaled, must be reset manually....
Definition manual_reset_event.h:33
Encapsulates operating system specific objects that wait for exclusive access to shared resources.
Definition wait_handle.h:50
#define core_export_
Define shared library export.
Definition core_export.h:13
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition types.h:230
socket_error
Defines error codes for the xtd::net::sockets::socket class.
Definition socket_error.h:28
std::shared_ptr< xtd::iasync_result > async_result
Represents the status of an asynchronous operation.
Definition async_result.h:16
delegate< void(async_result ar)> async_callback
References a method to be called when a corresponding asynchronous operation completes.
Definition delegate.h:34
@ success
Operation successful.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::net::sockets::tcp_client class.