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_level.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_level {
30  socket = 65535,
32  ip = 0,
34  ip_v6 = 41,
36  tcp = 6,
38  udp = 17,
39  };
40 
42  inline std::ostream& operator<<(std::ostream& os, socket_option_level value) {return os << to_string(value, {{socket_option_level::socket, "socket"}, {socket_option_level::ip, "ip"}, {socket_option_level::ip_v6, "ip_v6"}, {socket_option_level::tcp, "tcp"}, {socket_option_level::udp, "udp"}});}
43  inline std::wostream& operator<<(std::wostream& os, socket_option_level value) {return os << to_string(value, {{socket_option_level::socket, L"socket"}, {socket_option_level::ip, L"ip"}, {socket_option_level::ip_v6, L"ip_v6"}, {socket_option_level::tcp, L"tcp"}, {socket_option_level::udp, L"udp"}});}
45  }
46  }
47 }
Implements the Berkeley sockets interface.
Definition: socket.h:68
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Internet Protocol version 6 (IPv6).
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
Transmission Control Protocol.
Socket options apply to all sockets.
socket_option_level
Defines socket option levels for the xtd::net::sockets::socket::set_socket_option and xtd::net::socke...
Definition: socket_option_level.h:28