xtd 0.2.0
xtd::net::sockets Namespace Reference

Definition

The xtd::net::sockets namespace provides a managed implementation of the Berkeley Sockets interface for developers who need to tightly control access to the network.

Classes

class  ip_packet_information
 Gets the network interface information that is associated with a call to xtd::net::sockets::socket::receive_message_from or xtd::net::sockets::socket::end_receive_message_from. More...
 
class  ip_v6_multicast_option
 Contains option values for joining an IPv6 multicast group. More...
 
class  linger_option
 Specifies whether a xtd::net::sockets::socket will remain connected after a call to the xtd::net::sockets::socket::close or xtd::net::sockets::tcp_client::close methods and the length of time it will remain connected, if data remains to be sent. More...
 
class  multicast_option
 Contains IPAddress values used to join and drop multicast groups. More...
 
class  network_stream
 Provides the underlying stream of data for network access. More...
 
class  send_packets_element
 Represents an element in a xtd::net::sockets::send_packets_element array. More...
 
class  socket
 Implements the Berkeley sockets interface. More...
 
class  socket_async_event_args
 Represents an asynchronous socket operation. More...
 
class  socket_exception
 The exception that is thrown when a socket error occurs. More...
 
class  socket_information
 Encapsulates the information that is necessary to duplicate a xtd::net::sockets::socket. More...
 
class  tcp_client
 Provides client connections for TCP network services. More...
 
class  tcp_listener
 Listens for connections from TCP network clients. More...
 
class  udp_client
 Provides User Datagram Protocol (UDP) network services. More...
 

Enumerations

enum  address_family {
  address_family::unknown = -1,
  address_family::unspecified = 0,
  address_family::unix = 1,
  address_family::inter_network = 2,
  address_family::imp_link = 3,
  address_family::pup = 4,
  address_family::chaos = 5,
  address_family::ns = 6,
  address_family::ipx = 6,
  address_family::iso = 7,
  address_family::osi = 7,
  address_family::ecma = 8,
  address_family::data_kit = 9,
  address_family::ccitt = 10,
  address_family::sna = 11,
  address_family::dec_net = 12,
  address_family::data_link = 13,
  address_family::lat = 14,
  address_family::hyper_channel = 15,
  address_family::apple_talk = 16,
  address_family::net_bios = 17,
  address_family::voice_view = 18,
  address_family::fire_fox = 19,
  address_family::banyan = 21,
  address_family::atm = 22,
  address_family::inter_network_v6 = 23,
  address_family::cluster = 24,
  address_family::ieee12844 = 25,
  address_family::irda = 26,
  address_family::network_designers = 28,
  address_family::max = 29
}
 Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use. More...
 
enum  io_control_code : uint64 {
  io_control_code::enable_circular_queuing = 671088642ul,
  io_control_code::flush = 671088644ul,
  io_control_code::address_list_change = 671088663ul,
  io_control_code::data_to_read = 1074030207ul,
  io_control_code::oob_data_read = 1074033415ul,
  io_control_code::get_broadcast_address = 1207959557ul,
  io_control_code::address_list_query = 1207959574ul,
  io_control_code::query_target_pnp_handle = 1207959576ul,
  io_control_code::async_io = 2147772029ul,
  io_control_code::non_blocking_io = 2147772030ul,
  io_control_code::associate_handle = 2281701377ul,
  io_control_code::multipoint_loopback = 2281701385ul,
  io_control_code::multicast_scope = 2281701386ul,
  io_control_code::set_qos = 2281701387ul,
  io_control_code::set_group_qos = 2281701388ul,
  io_control_code::routing_interface_change = 2281701397ul,
  io_control_code::namespace_change = 2281701401ul,
  io_control_code::receive_all = 2550136833ul,
  io_control_code::receive_all_multicast = 2550136834ul,
  io_control_code::receive_all_igmp_multicast = 2550136835ul,
  io_control_code::keep_alive_values = 2550136836ul,
  io_control_code::absorb_router_alert = 2550136837ul,
  io_control_code::unicast_interface = 2550136838ul,
  io_control_code::limit_broadcasts = 2550136839ul,
  io_control_code::bind_to_interface = 2550136840ul,
  io_control_code::multicast_interface = 2550136841ul,
  io_control_code::add_multicast_group_on_interface = 2550136842ul,
  io_control_code::delete_multicast_group_from_interface = 2550136843ul,
  io_control_code::get_extension_function_pointer = 3355443206ul,
  io_control_code::get_qos = 3355443207ul,
  io_control_code::get_group_qos = 3355443208ul,
  io_control_code::translate_handle = 3355443213ul,
  io_control_code::routing_interface_query = 3355443220ul,
  io_control_code::address_list_sort = 3355443225ul
}
 Specifies the IO control codes supported by the xtd::net::sockets::socket::io_control method. More...
 
enum  ip_protection_level {
  ip_protection_level::unspecified = -1,
  ip_protection_level::unrestricted = 10,
  ip_protection_level::edge_restricted = 20,
  ip_protection_level::restricted = 30
}
 A value that enables restriction of an IPv6 socket to a specified scope, such as addresses with the same link local or site local prefix. More...
 
enum  protocol_family {
  protocol_family::unknown = -1,
  protocol_family::unspecified = 0,
  protocol_family::unix = 1,
  protocol_family::inter_network = 2,
  protocol_family::imp_link = 3,
  protocol_family::pup = 4,
  protocol_family::chaos = 5,
  protocol_family::ns = 6,
  protocol_family::ipx = 6,
  protocol_family::iso = 7,
  protocol_family::osi = 7,
  protocol_family::ecma = 8,
  protocol_family::data_kit = 9,
  protocol_family::ccitt = 10,
  protocol_family::sna = 11,
  protocol_family::dec_net = 12,
  protocol_family::data_link = 13,
  protocol_family::lat = 14,
  protocol_family::hyper_channel = 15,
  protocol_family::apple_talk = 16,
  protocol_family::net_bios = 17,
  protocol_family::voice_view = 18,
  protocol_family::fire_fox = 19,
  protocol_family::banyan = 21,
  protocol_family::atm = 22,
  protocol_family::inter_network_v6 = 23,
  protocol_family::cluster = 24,
  protocol_family::ieee12844 = 25,
  protocol_family::irda = 26,
  protocol_family::network_designers = 28,
  protocol_family::max = 29
}
 Specifies the type of protocol that an instance of the xtd::net::sockets::socket class can use. More...
 
enum  protocol_type {
  protocol_type::unknown = -1,
  protocol_type::ip_v6_hop_by_hop_options = 0,
  protocol_type::unspecified = 0,
  protocol_type::ip = 0,
  protocol_type::icmp = 1,
  protocol_type::igmp = 2,
  protocol_type::ggp = 3,
  protocol_type::ip_v4 = 4,
  protocol_type::tcp = 6,
  protocol_type::pup = 12,
  protocol_type::udp = 17,
  protocol_type::idp = 22,
  protocol_type::ip_v6 = 41,
  protocol_type::ip_v6_routing_header = 43,
  protocol_type::ip_v6_fragment_header = 44,
  protocol_type::ip_sec_encapsulating_security_payload = 50,
  protocol_type::ip_sec_authentication_header = 51,
  protocol_type::icmp_v6 = 58,
  protocol_type::ip_v6_no_next_header = 59,
  protocol_type::ip_v6_destination_options = 60,
  protocol_type::nd = 77,
  protocol_type::raw = 255,
  protocol_type::ipx = 1000,
  protocol_type::spx = 1256,
  protocol_type::spx_2 = 1257
}
 Specifies the protocols that the xtd::net::sockets::socket class supports. More...
 
enum  select_mode {
  select_mode::select_read = 0,
  select_mode::select_write = 1,
  select_mode::select_error = 2
}
 Defines the polling modes for the xtd::net::sockets::socket::poll method. More...
 
enum  socket_async_operation {
  socket_async_operation::none = 0,
  socket_async_operation::accept = 1,
  socket_async_operation::connect = 2,
  socket_async_operation::disconnect = 3,
  socket_async_operation::receive = 4,
  socket_async_operation::receive_from = 5,
  socket_async_operation::receive_message_from = 6,
  socket_async_operation::send = 7,
  socket_async_operation::send_packets = 8,
  socket_async_operation::send_to = 9
}
 The type of asynchronous socket operation most recently performed with this context object. More...
 
enum  socket_error {
  socket_error::sock_error = -1,
  socket_error::success = 0,
  socket_error::operation_aborted = 995,
  socket_error::io_pending = 997,
  socket_error::interrupted = 10004,
  socket_error::access_denied = 10013,
  socket_error::fault = 10014,
  socket_error::invalid_argument = 10022,
  socket_error::too_many_open_sockets = 10024,
  socket_error::would_block = 10035,
  socket_error::in_progress = 10036,
  socket_error::already_in_progress = 10037,
  socket_error::not_socket = 10038,
  socket_error::destination_address_required = 10039,
  socket_error::message_size = 10040,
  socket_error::protocol_type = 10041,
  socket_error::protocol_option = 10042,
  socket_error::protocol_not_supported = 10043,
  socket_error::socket_not_supported = 10044,
  socket_error::operation_not_supported = 10045,
  socket_error::protocol_family_not_supported = 10046,
  socket_error::address_family_not_supported = 10047,
  socket_error::address_already_in_use = 10048,
  socket_error::address_not_available = 10049,
  socket_error::network_down = 10050,
  socket_error::network_unreachable = 10051,
  socket_error::network_reset = 10052,
  socket_error::connection_aborted = 10053,
  socket_error::connection_reset = 10054,
  socket_error::no_buffer_space_available = 10055,
  socket_error::is_connected = 10056,
  socket_error::not_connected = 10057,
  socket_error::shutdown = 10058,
  socket_error::timed_out = 10060,
  socket_error::connection_refused = 10061,
  socket_error::host_down = 10064,
  socket_error::host_unreachable = 10065,
  socket_error::process_limit = 10067,
  socket_error::system_not_ready = 10091,
  socket_error::version_not_supported = 10092,
  socket_error::not_initialized = 10093,
  socket_error::disconnecting = 10101,
  socket_error::type_not_found = 10109,
  socket_error::host_not_found = 11001,
  socket_error::try_again = 11002,
  socket_error::no_recovery = 11003,
  socket_error::no_data = 11004
}
 Defines error codes for the xtd::net::sockets::socket class. More...
 
enum  socket_flags {
  socket_flags::none = 0x0000,
  socket_flags::out_of_band = 0x0001,
  socket_flags::peek = 0x0002,
  socket_flags::dont_route = 0x0004,
  socket_flags::max_io_vector_length = 0x0010,
  socket_flags::truncated = 0x0100,
  socket_flags::control_data_truncated = 0x0200,
  socket_flags::broadcast = 0x0400,
  socket_flags::multicast = 0x0800,
  socket_flags::partial = 0x8000
}
 Specifies socket send and receive behaviors. This enumeration has a flags attribute that allows a bitwise combination of its member values. More...
 
enum  socket_information_options {
  socket_information_options::none = 0x00,
  socket_information_options::non_blocking = 0x01,
  socket_information_options::connected = 0x02,
  socket_information_options::listening = 0x04,
  socket_information_options::use_only_overlapped_io = 0x08
}
 Describes states for a xtd::net::sockets::socket. This enumeration has a flags attribute that allows a bitwise combination of its member values. More...
 
enum  socket_option_level {
  socket_option_level::socket = 65535,
  socket_option_level::ip = 0,
  socket_option_level::ip_v6 = 41,
  socket_option_level::tcp = 6,
  socket_option_level::udp = 17
}
 Defines socket option levels for the xtd::net::sockets::socket::set_socket_option and xtd::net::sockets::socket::get_socket_option methods. More...
 
enum  socket_option_name {
  socket_option_name::debug = 1,
  socket_option_name::accept_connection = 2,
  socket_option_name::reuse_address = 4,
  socket_option_name::keep_alive = 8,
  socket_option_name::dont_route = 16,
  socket_option_name::broadcast = 32,
  socket_option_name::use_loopback = 64,
  socket_option_name::linger = 128,
  socket_option_name::out_of_band_inline = 256,
  socket_option_name::dont_linger = -129,
  socket_option_name::exclusive_address_use = -5,
  socket_option_name::send_buffer = 4097,
  socket_option_name::receive_buffer = 4098,
  socket_option_name::send_low_water = 4099,
  socket_option_name::receive_low_water = 4100,
  socket_option_name::send_timeout = 4101,
  socket_option_name::receive_timeout = 4102,
  socket_option_name::error = 4103,
  socket_option_name::type = 4104,
  socket_option_name::max_connections = 2147483647,
  socket_option_name::ip_options = 1,
  socket_option_name::header_included = 2,
  socket_option_name::type_of_service = 3,
  socket_option_name::ip_time_to_live = 4,
  socket_option_name::multicast_interface = 9,
  socket_option_name::multicast_time_to_live = 10,
  socket_option_name::multicast_loopback = 11,
  socket_option_name::add_membership = 12,
  socket_option_name::drop_membership = 13,
  socket_option_name::dont_fragment = 14,
  socket_option_name::add_source_membership = 15,
  socket_option_name::drop_source_membership = 16,
  socket_option_name::block_source = 17,
  socket_option_name::unblock_source = 18,
  socket_option_name::packet_information = 19,
  socket_option_name::hop_limit = 21,
  socket_option_name::ip_protection_level = 23,
  socket_option_name::ip_v6_only = 27,
  socket_option_name::no_delay = 1,
  socket_option_name::bsd_urgent = 2,
  socket_option_name::expedited = 2,
  socket_option_name::no_checksum = 1,
  socket_option_name::checksum_coverage = 20,
  socket_option_name::update_accept_context = 28683,
  socket_option_name::update_connect_context = 28688
}
 Defines configuration option names. More...
 
enum  socket_shutdown {
  socket_shutdown::receive = 0,
  socket_shutdown::send = 1,
  socket_shutdown::both = 2
}
 Defines constants that are used by the xtd::net::sockets::socket::shutdown method. More...
 
enum  socket_type {
  socket_type::unknown = -1,
  socket_type::stream = 1,
  socket_type::dgram = 2,
  socket_type::raw = 3,
  socket_type::rdm = 4,
  socket_type::seqpacket = 5
}
 Specifies the type of socket that an instance of the xtd::net::sockets::socket class represents. More...
 
enum  transmit_file_options {
  transmit_file_options::use_default_worker_thread = 0,
  transmit_file_options::disconnect = 0b1,
  transmit_file_options::reuse_socket = 0b10,
  transmit_file_options::write_behind = 0b100,
  transmit_file_options::use_system_thread = 0b1000,
  transmit_file_options::use_kernel_apc = 0b100000
}
 The TransmitFileOptions enumeration defines values used in file transfer requests. More...