xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Classes | Enumerations
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 class  address_family {
  unknown ,
  unspecified ,
  unix ,
  inter_network ,
  imp_link ,
  pup ,
  chaos ,
  ns ,
  ipx ,
  iso ,
  osi ,
  ecma ,
  data_kit ,
  ccitt ,
  sna ,
  dec_net ,
  data_link ,
  lat ,
  hyper_channel ,
  apple_talk ,
  net_bios ,
  voice_view ,
  fire_fox ,
  banyan ,
  atm ,
  inter_network_v6 ,
  cluster ,
  ieee12844 ,
  irda ,
  network_designers ,
  max
}
 Specifies the addressing scheme that an instance of the xtd::net::sockets::socket class can use. More...
 
enum class  io_control_code : uint64_t {
  enable_circular_queuing ,
  flush ,
  address_list_change ,
  data_to_read ,
  oob_data_read ,
  get_broadcast_address ,
  address_list_query ,
  query_target_pnp_handle ,
  async_io ,
  non_blocking_io ,
  associate_handle ,
  multipoint_loopback ,
  multicast_scope ,
  set_qos ,
  set_group_qos ,
  routing_interface_change ,
  namespace_change ,
  receive_all ,
  receive_all_multicast ,
  receive_all_igmp_multicast ,
  keep_alive_values ,
  absorb_router_alert ,
  unicast_interface ,
  limit_broadcasts ,
  bind_to_interface ,
  multicast_interface ,
  add_multicast_group_on_interface ,
  delete_multicast_group_from_interface ,
  get_extension_function_pointer ,
  get_qos ,
  get_group_qos ,
  translate_handle ,
  routing_interface_query ,
  address_list_sort
}
 Specifies the IO control codes supported by the xtd::net::sockets::socket::io_control method. More...
 
enum class  ip_protection_level {
  unspecified ,
  unrestricted ,
  edge_restricted ,
  restricted
}
 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 class  protocol_family {
  unknown ,
  unspecified ,
  unix ,
  inter_network ,
  imp_link ,
  pup ,
  chaos ,
  ns ,
  ipx ,
  iso ,
  osi ,
  ecma ,
  data_kit ,
  ccitt ,
  sna ,
  dec_net ,
  data_link ,
  lat ,
  hyper_channel ,
  apple_talk ,
  net_bios ,
  voice_view ,
  fire_fox ,
  banyan ,
  atm ,
  inter_network_v6 ,
  cluster ,
  ieee12844 ,
  irda ,
  network_designers ,
  max
}
 Specifies the type of protocol that an instance of the xtd::net::sockets::socket class can use. More...
 
enum class  protocol_type {
  unknown ,
  ip_v6_hop_by_hop_options ,
  unspecified ,
  ip ,
  icmp ,
  igmp ,
  ggp ,
  ip_v4 ,
  tcp ,
  pup ,
  udp ,
  idp ,
  ip_v6 ,
  ip_v6_routing_header ,
  ip_v6_fragment_header ,
  ip_sec_encapsulating_security_payload ,
  ip_sec_authentication_header ,
  icmp_v6 ,
  ip_v6_no_next_header ,
  ip_v6_destination_options ,
  nd ,
  raw ,
  ipx ,
  spx ,
  spx_2
}
 Specifies the protocols that the xtd::net::sockets::socket class supports. More...
 
enum class  select_mode {
  select_read ,
  select_write ,
  select_error
}
 Defines the polling modes for the xtd::net::sockets::socket::poll method. More...
 
enum class  socket_async_operation {
  none ,
  accept ,
  connect ,
  disconnect ,
  receive ,
  receive_from ,
  receive_message_from ,
  send ,
  send_packets ,
  send_to
}
 The type of asynchronous socket operation most recently performed with this context object. More...
 
enum class  socket_error {
  sock_error ,
  success ,
  operation_aborted ,
  io_pending ,
  interrupted ,
  access_denied ,
  fault ,
  invalid_argument ,
  too_many_open_sockets ,
  would_block ,
  in_progress ,
  already_in_progress ,
  not_socket ,
  destination_address_required ,
  message_size ,
  protocol_type ,
  protocol_option ,
  protocol_not_supported ,
  socket_not_supported ,
  operation_not_supported ,
  protocol_family_not_supported ,
  address_family_not_supported ,
  address_already_in_use ,
  address_not_available ,
  network_down ,
  network_unreachable ,
  network_reset ,
  connection_aborted ,
  connection_reset ,
  no_buffer_space_available ,
  is_connected ,
  not_connected ,
  shutdown ,
  timed_out ,
  connection_refused ,
  host_down ,
  host_unreachable ,
  process_limit ,
  system_not_ready ,
  version_not_supported ,
  not_initialized ,
  disconnecting ,
  type_not_found ,
  host_not_found ,
  try_again ,
  no_recovery ,
  no_data
}
 Defines error codes for the xtd::net::sockets::socket class. More...
 
enum class  socket_flags {
  none ,
  out_of_band ,
  peek ,
  dont_route ,
  max_io_vector_length ,
  truncated ,
  control_data_truncated ,
  broadcast ,
  multicast ,
  partial
}
 Specifies socket send and receive behaviors. This enumeration has a flags attribute that allows a bitwise combination of its member values. More...
 
enum class  socket_information_options {
  none ,
  non_blocking ,
  connected ,
  listening ,
  use_only_overlapped_io
}
 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 class  socket_option_level {
  socket ,
  ip ,
  ip_v6 ,
  tcp ,
  udp
}
 Defines socket option levels for the xtd::net::sockets::socket::set_socket_option and xtd::net::sockets::socket::get_socket_option methods. More...
 
enum class  socket_option_name {
  debug ,
  accept_connection ,
  reuse_address ,
  keep_alive ,
  dont_route ,
  broadcast ,
  use_loopback ,
  linger ,
  out_of_band_inline ,
  dont_linger ,
  exclusive_address_use ,
  send_buffer ,
  receive_buffer ,
  send_low_water ,
  receive_low_water ,
  send_timeout ,
  receive_timeout ,
  error ,
  type ,
  max_connections ,
  ip_options ,
  header_included ,
  type_of_service ,
  ip_time_to_live ,
  multicast_interface ,
  multicast_time_to_live ,
  multicast_loopback ,
  add_membership ,
  drop_membership ,
  dont_fragment ,
  add_source_membership ,
  drop_source_membership ,
  block_source ,
  unblock_source ,
  packet_information ,
  hop_limit ,
  ip_protection_level ,
  ip_v6_only ,
  no_delay ,
  bsd_urgent ,
  expedited ,
  no_checksum ,
  checksum_coverage ,
  update_accept_context ,
  update_connect_context
}
 Defines configuration option names. More...
 
enum class  socket_shutdown {
  receive ,
  send ,
  both
}
 Defines constants that are used by the xtd::net::sockets::socket::shutdown method. More...
 
enum class  socket_type {
  unknown ,
  stream ,
  dgram ,
  raw ,
  rdm ,
  seqpacket
}
 Specifies the type of socket that an instance of the xtd::net::sockets::socket class represents. More...
 
enum class  transmit_file_options {
  use_default_worker_thread ,
  disconnect ,
  reuse_socket ,
  write_behind ,
  use_system_thread ,
  use_kernel_apc
}
 The TransmitFileOptions enumeration defines values used in file transfer requests. More...