xtd 0.2.0
socket_option_name.h
Go to the documentation of this file.
1 #pragma once
5 #include "../../enum.h"
6 
8 #undef unix
9 
12 namespace xtd {
14  namespace net {
16  namespace sockets {
29  enum class socket_option_name {
31  debug = 1,
35  reuse_address = 4,
37  keep_alive = 8,
39  dont_route = 16,
41  broadcast = 32,
43  use_loopback = 64,
45  linger = 128,
47  out_of_band_inline = 256,
49  dont_linger = -129,
53  send_buffer = 4097,
55  receive_buffer = 4098,
57  send_low_water = 4099,
59  receive_low_water = 4100,
61  send_timeout = 4101,
63  receive_timeout = 4102,
65  error = 4103,
67  type = 4104,
69  max_connections = 2147483647,
71  ip_options = 1,
73  header_included = 2,
75  type_of_service = 3,
77  ip_time_to_live = 4,
83  multicast_loopback = 11,
85  add_membership = 12,
87  drop_membership = 13,
89  dont_fragment = 14,
95  block_source = 17,
97  unblock_source = 18,
99  packet_information = 19,
101  hop_limit = 21,
103  ip_protection_level = 23,
105  ip_v6_only = 27,
107  no_delay = 1,
109  bsd_urgent = 2,
111  expedited = 2,
113  no_checksum = 1,
115  checksum_coverage = 20,
117  update_accept_context = 28683,
119  update_connect_context = 28688
120  };
121  }
122  }
123 }
124 
127  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::net::sockets::socket_option_name> {{xtd::net::sockets::socket_option_name::debug, "debug"}, {xtd::net::sockets::socket_option_name::accept_connection, "accept_connection"}, {xtd::net::sockets::socket_option_name::reuse_address, "reuse_address"}, {xtd::net::sockets::socket_option_name::keep_alive, "keep_alive"}, {xtd::net::sockets::socket_option_name::dont_route, "dont_route"}, {xtd::net::sockets::socket_option_name::broadcast, "broadcast"}, {xtd::net::sockets::socket_option_name::use_loopback, "use_loopback"}, {xtd::net::sockets::socket_option_name::linger, "linger"}, {xtd::net::sockets::socket_option_name::out_of_band_inline, "out_of_band_inline"}, {xtd::net::sockets::socket_option_name::dont_linger, "dont_linger"}, {xtd::net::sockets::socket_option_name::exclusive_address_use, "exclusive_address_use"}, {xtd::net::sockets::socket_option_name::send_buffer, "send_buffer"}, {xtd::net::sockets::socket_option_name::receive_buffer, "receive_buffer"}, {xtd::net::sockets::socket_option_name::send_low_water, "send_low_water"}, {xtd::net::sockets::socket_option_name::receive_low_water, "receive_low_water"}, {xtd::net::sockets::socket_option_name::send_timeout, "send_timeout"}, {xtd::net::sockets::socket_option_name::receive_timeout, "receive_timeout"}, {xtd::net::sockets::socket_option_name::error, "error"}, {xtd::net::sockets::socket_option_name::type, "type"}, {xtd::net::sockets::socket_option_name::max_connections, "max_connections"}, {xtd::net::sockets::socket_option_name::type_of_service, "type_of_service"}, {xtd::net::sockets::socket_option_name::multicast_interface, "multicast_interface"}, {xtd::net::sockets::socket_option_name::multicast_time_to_live, "multicast_time_to_live"}, {xtd::net::sockets::socket_option_name::multicast_loopback, "multicast_loopback"}, {xtd::net::sockets::socket_option_name::add_membership, "add_membership"}, {xtd::net::sockets::socket_option_name::drop_membership, "drop_membership"}, {xtd::net::sockets::socket_option_name::block_source, "block_source"}, {xtd::net::sockets::socket_option_name::unblock_source, "unblock_source"}, {xtd::net::sockets::socket_option_name::packet_information, "packet_information"}, {xtd::net::sockets::socket_option_name::hop_limit, "hop_limit"}, {xtd::net::sockets::socket_option_name::ip_protection_level, "ip_protection_level"}, {xtd::net::sockets::socket_option_name::ip_v6_only, "ip_v6_only"}, {xtd::net::sockets::socket_option_name::checksum_coverage, "checksum_coverage"}, {xtd::net::sockets::socket_option_name::update_accept_context, "update_accept_context"}, {xtd::net::sockets::socket_option_name::update_connect_context, "update_connect_context"}};}
128 };
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:217
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:29
Sets the interface used for outgoing multicast packets. The interface is identified by its index...
Gets 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:29
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::vector< std::pair< enum_t, xtd::ustring > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition: enum_collection.h:19
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.
Sets 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.
Sets 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.
Provides the registration struct for enumerations.
Definition: enum_register.h:36