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_information_options.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 {
30  none = 0x00,
32  non_blocking = 0x01,
34  connected = 0x02,
36  listening = 0x04,
39  };
40 
42  inline socket_information_options& operator^=(socket_information_options& lhs, socket_information_options rhs) {lhs = static_cast<socket_information_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs)); return lhs;}
43  inline socket_information_options& operator&=(socket_information_options& lhs, socket_information_options rhs) {lhs = static_cast<socket_information_options>(static_cast<int>(lhs) & static_cast<int>(rhs)); return lhs;}
44  inline socket_information_options& operator|=(socket_information_options& lhs, socket_information_options rhs) {lhs = static_cast<socket_information_options>(static_cast<int>(lhs) | static_cast<int>(rhs)); return lhs;}
45  inline socket_information_options& operator+=(socket_information_options& lhs, socket_information_options rhs) {lhs = static_cast<socket_information_options>(static_cast<int>(lhs) + static_cast<int>(rhs)); return lhs;}
46  inline socket_information_options& operator-=(socket_information_options& lhs, socket_information_options rhs) {lhs = static_cast<socket_information_options>(static_cast<int>(lhs) - static_cast<int>(rhs)); return lhs;}
47  inline socket_information_options operator^(socket_information_options lhs, socket_information_options rhs) {return static_cast<socket_information_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs));}
48  inline socket_information_options operator&(socket_information_options lhs, socket_information_options rhs) {return static_cast<socket_information_options>(static_cast<int>(lhs) & static_cast<int>(rhs));}
49  inline socket_information_options operator|(socket_information_options lhs, socket_information_options rhs) {return static_cast<socket_information_options>(static_cast<int>(lhs) | static_cast<int>(rhs));}
50  inline socket_information_options operator+(socket_information_options lhs, socket_information_options rhs) {return static_cast<socket_information_options>(static_cast<int>(lhs) + static_cast<int>(rhs));}
51  inline socket_information_options operator-(socket_information_options lhs, socket_information_options rhs) {return static_cast<socket_information_options>(static_cast<int>(lhs) - static_cast<int>(rhs));}
52  inline socket_information_options operator~(socket_information_options lhs) {return static_cast<socket_information_options>(~static_cast<int>(lhs));}
53  inline std::ostream& operator<<(std::ostream& os, socket_information_options value) {return os << to_string(value, {{socket_information_options::none, "none"}, {socket_information_options::non_blocking, "non_blocking"}, {socket_information_options::connected, "connected"}, {socket_information_options::listening, "listening"}, {socket_information_options::use_only_overlapped_io, "use_only_overlapped_io"}});}
54  inline std::wostream& operator<<(std::wostream& os, socket_information_options value) {return os << to_string(value, {{socket_information_options::none, L"none"}, {socket_information_options::non_blocking, L"non_blocking"}, {socket_information_options::connected, L"connected"}, {socket_information_options::listening, L"listening"}, {socket_information_options::use_only_overlapped_io, L"use_only_overlapped_io"}});}
56  }
57  }
58 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
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
socket_information_options
Describes states for a xtd::net::sockets::socket. This enumeration has a flags attribute that allows ...
Definition: socket_information_options.h:28
The Socket is listening for new connections.