6 #include "../../ustring.h"
119 inline std::ostream& operator<<(std::ostream& os,
socket_option_name value) {
return os <<
to_string(value, {{
socket_option_name::debug,
"debug"}, {
socket_option_name::accept_connection,
"accept_connection"}, {
socket_option_name::reuse_address,
"reuse_address"}, {
socket_option_name::keep_alive,
"keep_alive"}, {
socket_option_name::dont_route,
"dont_route"}, {
socket_option_name::broadcast,
"broadcast"}, {
socket_option_name::use_loopback,
"use_loopback"}, {
socket_option_name::linger,
"linger"}, {
socket_option_name::out_of_band_inline,
"out_of_band_inline"}, {
socket_option_name::dont_linger,
"dont_linger"}, {
socket_option_name::exclusive_address_use,
"exclusive_address_use"}, {
socket_option_name::send_buffer,
"send_buffer"}, {
socket_option_name::receive_buffer,
"receive_buffer"}, {
socket_option_name::send_low_water,
"send_low_water"}, {
socket_option_name::receive_low_water,
"receive_low_water"}, {
socket_option_name::send_timeout,
"send_timeout"}, {
socket_option_name::receive_timeout,
"receive_timeout"}, {
socket_option_name::error,
"error"}, {
socket_option_name::type,
"type"}, {
socket_option_name::max_connections,
"max_connections"}, {
socket_option_name::ip_options,
"ip_options"}, {
socket_option_name::header_included,
"header_included"}, {
socket_option_name::type_of_service,
"type_of_service"}, {
socket_option_name::ip_time_to_live,
"ip_time_to_live"}, {
socket_option_name::multicast_interface,
"multicast_interface"}, {
socket_option_name::multicast_time_to_live,
"multicast_time_to_live"}, {
socket_option_name::multicast_loopback,
"multicast_loopback"}, {
socket_option_name::add_membership,
"add_membership"}, {
socket_option_name::drop_membership,
"drop_membership"}, {
socket_option_name::block_source,
"block_source"}, {
socket_option_name::unblock_source,
"unblock_source"}, {
socket_option_name::packet_information,
"packet_information"}, {
socket_option_name::hop_limit,
"hop_limit"}, {
socket_option_name::ip_protection_level,
"ip_protection_level"}, {
socket_option_name::ip_v6_only,
"ip_v6_only"}, {
socket_option_name::no_delay,
"no_delay"}, {
socket_option_name::bsd_urgent,
"bsd_urgent"}, {
socket_option_name::expedited,
"expedited"}, {
socket_option_name::no_checksum,
"no_checksum"}, {
socket_option_name::checksum_coverage,
"checksum_coverage"}, {
socket_option_name::update_accept_context,
"update_accept_context"}, {
socket_option_name::update_connect_context,
"update_connect_context"}});}
120 inline std::wostream& operator<<(std::wostream& os,
socket_option_name value) {
return os <<
to_string(value, {{
socket_option_name::debug, L
"debug"}, {
socket_option_name::accept_connection, L
"accept_connection"}, {
socket_option_name::reuse_address, L
"reuse_address"}, {
socket_option_name::keep_alive, L
"keep_alive"}, {
socket_option_name::dont_route, L
"dont_route"}, {
socket_option_name::broadcast, L
"broadcast"}, {
socket_option_name::use_loopback, L
"use_loopback"}, {
socket_option_name::linger, L
"linger"}, {
socket_option_name::out_of_band_inline, L
"out_of_band_inline"}, {
socket_option_name::dont_linger, L
"dont_linger"}, {
socket_option_name::exclusive_address_use, L
"exclusive_address_use"}, {
socket_option_name::send_buffer, L
"send_buffer"}, {
socket_option_name::receive_buffer, L
"receive_buffer"}, {
socket_option_name::send_low_water, L
"send_low_water"}, {
socket_option_name::receive_low_water, L
"receive_low_water"}, {
socket_option_name::send_timeout, L
"send_timeout"}, {
socket_option_name::receive_timeout, L
"receive_timeout"}, {
socket_option_name::error, L
"error"}, {
socket_option_name::type, L
"type"}, {
socket_option_name::max_connections, L
"max_connections"}, {
socket_option_name::ip_options, L
"ip_options"}, {
socket_option_name::header_included, L
"header_included"}, {
socket_option_name::type_of_service, L
"type_of_service"}, {
socket_option_name::ip_time_to_live, L
"ip_time_to_live"}, {
socket_option_name::multicast_interface, L
"multicast_interface"}, {
socket_option_name::multicast_time_to_live, L
"multicast_time_to_live"}, {
socket_option_name::multicast_loopback, L
"multicast_loopback"}, {
socket_option_name::add_membership, L
"add_membership"}, {
socket_option_name::drop_membership, L
"drop_membership"}, {
socket_option_name::block_source, L
"block_source"}, {
socket_option_name::unblock_source, L
"unblock_source"}, {
socket_option_name::packet_information, L
"packet_information"}, {
socket_option_name::hop_limit, L
"hop_limit"}, {
socket_option_name::ip_protection_level, L
"ip_protection_level"}, {
socket_option_name::ip_v6_only, L
"ip_v6_only"}, {
socket_option_name::no_delay, L
"no_delay"}, {
socket_option_name::bsd_urgent, L
"bsd_urgent"}, {
socket_option_name::expedited, L
"expedited"}, {
socket_option_name::no_checksum, L
"no_checksum"}, {
socket_option_name::checksum_coverage, L
"checksum_coverage"}, {
socket_option_name::update_accept_context, L
"update_accept_context"}, {
socket_option_name::update_connect_context, L
"update_connect_context"}});}
std::type_info type
Stores information about a type.
Definition: types.h:179
socket_option_name
Defines configuration option names.
Definition: socket_option_name.h:25
ip_protection_level
A value that enables restriction of an IPv6 socket to a specified scope, such as addresses with the s...
Definition: ip_protection_level.h:25
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
@ max_connections
Not supported; will throw a xtd::net::sockets::socket_exception exception if used.
@ receive_timeout
Receive a time-out. This option applies only to synchronous methods; it has no effect on asynchronous...
@ update_connect_context
Updates a connected socket's properties by using those of an existing socket. This is equivalent to u...
@ dont_linger
Close the socket gracefully without lingering.
@ multicast_interface
Set the interface for outgoing multicast packets.
@ add_source_membership
Join a source group.
@ hop_limit
Specifies the maximum number of router hops for an Internet Protocol version 6 (IPv6) packet....
@ exclusive_address_use
Enables a socket to be bound for exclusive access.
@ header_included
Indicates that the application provides the IP header for outgoing datagrams.
@ no_checksum
Send UDP datagrams with checksum set to zero.
@ type
Get the socket type.
@ type_of_service
Change the IP header type of the service field.
@ block_source
Block data from a source.
@ update_accept_context
Updates an accepted socket's properties by using those of an existing socket. This is equivalent to u...
@ drop_source_membership
Drop a source group.
@ expedited
Use expedited data as defined in RFC-1222. This option can be set only once; after it is set,...
@ packet_information
Return information about received packets.
@ use_loopback
Bypass hardware when possible.
@ ip_time_to_live
Set the IP header Time-to-Live field.
@ send_buffer
Specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum mess...
@ reuse_address
Allows the socket to be bound to an address that is already in use.
@ bsd_urgent
Use urgent data as defined in RFC-1222. This option can be set only once; after it is set,...
@ multicast_time_to_live
An IP multicast Time to Live.
@ send_timeout
Send a time-out. This option applies only to synchronous methods; it has no effect on asynchronous me...
@ debug
Record debugging information.
@ no_delay
Disables the Nagle algorithm for send coalescing.
@ ip_protection_level
Enables restriction of a IPv6 socket to a specified scope, such as addresses with the same link local...
@ ip_options
Specifies the IP options to be inserted into outgoing datagrams.
@ dont_route
Do not route; send the packet directly to the interface addresses.
@ broadcast
Permit sending broadcast messages on the socket.
@ multicast_loopback
An IP multicast loopback.
@ out_of_band_inline
Receives out-of-band data in the normal data stream.
@ keep_alive
Use keep-alive.
@ add_membership
Add an IP group membership.
@ send_low_water
Specifies the low water mark for xtd::net::sockets::socket::send operations.
@ error
Get the error status and clear.
@ ip_v6_only
Indicates if a socket created for the AF_INET6 address family is restricted to IPv6 communications on...
@ accept_connection
The socket is listening.
@ checksum_coverage
Set or get the UDP checksum coverage.
@ dont_fragment
Do not fragment IP datagrams.
@ drop_membership
Drop an IP group membership.
@ unblock_source
Unblock a previously blocked source.
@ receive_low_water
Specifies the low water mark for xtd::net::sockets::socket::receive operations.
@ linger
Linger on close if unsent data is present.
@ receive_buffer
Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum m...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17