xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
socket_option_name.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../../ustring.h"
7 
9 #undef unix
10 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
28  enum class socket_option_name {
30  debug = 1,
34  reuse_address = 4,
36  keep_alive = 8,
38  dont_route = 16,
40  broadcast = 32,
42  use_loopback = 64,
44  linger = 128,
46  out_of_band_inline = 256,
48  dont_linger = -129,
52  send_buffer = 4097,
54  receive_buffer = 4098,
56  send_low_water = 4099,
58  receive_low_water = 4100,
60  send_timeout = 4101,
62  receive_timeout = 4102,
64  error = 4103,
66  type = 4104,
68  max_connections = 2147483647,
70  ip_options = 1,
72  header_included = 2,
74  type_of_service = 3,
76  ip_time_to_live = 4,
82  multicast_loopback = 11,
84  add_membership = 12,
86  drop_membership = 13,
88  dont_fragment = 14,
94  block_source = 17,
96  unblock_source = 18,
98  packet_information = 19,
100  hop_limit = 21,
102  ip_protection_level = 23,
104  ip_v6_only = 27,
106  no_delay = 1,
108  bsd_urgent = 2,
110  expedited = 2,
112  no_checksum = 1,
114  checksum_coverage = 20,
116  update_accept_context = 28683,
118  update_connect_context = 28688
119  };
120 
122  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"}});}
123  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"}});}
125  }
126  }
127 }
Specifies the low water mark for xtd::net::sockets::socket::send operations.
Specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum mess...
Receives out-of-band data in the normal data stream.
std::type_info type
Stores information about a type.
Definition: types.h:179
Record debugging information.
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:28
Get the error status and clear.
Unblock a previously blocked source.
Change the IP header type of the service field.
Use urgent data as defined in RFC-1222. This option can be set only once; after it is set...
Send without using routing tables.
Receive a time-out. This option applies only to synchronous methods; it has no effect on asynchronous...
socket_option_name
Defines configuration option names.
Definition: socket_option_name.h:28
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Updates a connected socket&#39;s properties by using those of an existing socket. This is equivalent to u...
Enables a socket to be bound for exclusive access.
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1110
Send a time-out. This option applies only to synchronous methods; it has no effect on asynchronous me...
Use expedited data as defined in RFC-1222. This option can be set only once; after it is set...
Allows the socket to be bound to an address that is already in use.
Specifies the maximum number of router hops for an Internet Protocol version 6 (IPv6) packet...
Not supported; will throw a xtd::net::sockets::socket_exception exception if used.
Send UDP datagrams with checksum set to zero.
Set the interface used for outgoing multicast packets. The interface is identified by its index...
Set the IP header Time-to-Live field.
Close the socket gracefully without lingering.
Return information about received packets.
Enables restriction of a IPv6 socket to a specified scope, such as addresses with the same link local...
Disables the Nagle algorithm for send coalescing.
Updates an accepted socket&#39;s properties by using those of an existing socket. This is equivalent to u...
Specifies the IP options to be inserted into outgoing datagrams.
Linger on close if unsent data is present.
Set or get the UDP checksum coverage.
Indicates if a socket created for the AF_INET6 address family is restricted to IPv6 communications on...
Indicates that the application provides the IP header for outgoing datagrams.
Specifies the low water mark for xtd::net::sockets::socket::receive operations.
Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum m...
Permit sending broadcast messages on the socket.