xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
socket_option_level.h
Go to the documentation of this file.
1
4#pragma once
5
6#include "../../ustring.h"
7
9#undef unix
11
13namespace xtd {
15 namespace net {
17 namespace sockets {
27 socket = 65535,
29 ip = 0,
31 ip_v6 = 41,
33 tcp = 6,
35 udp = 17,
36 };
37
39 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"}});}
40 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"}});}
42 }
43 }
44}
Implements the Berkeley sockets interface.
Definition socket.h:63
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:25
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition to_string.h:37
@ ip_v6
Socket options apply only to IPv6 sockets.
@ socket
Socket options apply to all sockets.
@ udp
Socket options apply only to UDP sockets.
@ ip
Socket options apply only to IP sockets.
@ tcp
Socket options apply only to TCP sockets.
@ ip_v6
Internet Protocol version 6 (IPv6).
@ udp
User Datagram Protocol.
@ tcp
Transmission Control Protocol.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17