6#include "../../ustring.h"
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"}});}
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