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.
socket_shutdown.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../../ustring.h"
7 
9 #undef unix
11 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
25  enum class socket_shutdown {
27  receive = 0,
29  send = 1,
31  both = 2
32  };
33 
35  inline std::ostream& operator<<(std::ostream& os, socket_shutdown value) {return os << to_string(value, {{socket_shutdown::receive, "receive"}, {socket_shutdown::send, "send"}, {socket_shutdown::both, "both"}});}
36  inline std::wostream& operator<<(std::wostream& os, socket_shutdown value) {return os << to_string(value, {{socket_shutdown::receive, L"receive"}, {socket_shutdown::send, L"send"}, {socket_shutdown::both, L"both"}});}
38  }
39  }
40 }
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
socket_shutdown
Defines constants that are used by the xtd::net::sockets::socket::shutdown method.
Definition: socket_shutdown.h:25
@ send
Disables a xtd::net::sockets::socket for sending. This field is constant.
@ receive
Disables a xtd::net::sockets::socket for receiving. This field is constant.
@ both
Disables a xtd::net::sockets::socket for both sending and receiving. This field is constant.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17