xtd - Reference Guide  0.1.0
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_information_options.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 none = 0x00,
29 non_blocking = 0x01,
31 connected = 0x02,
33 listening = 0x04,
36 };
37
39 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;}
40 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;}
41 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;}
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) {return static_cast<socket_information_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs));}
45 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));}
46 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));}
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) {return static_cast<socket_information_options>(~static_cast<int>(lhs));}
50 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"}});}
51 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"}});}
53 }
54 }
55}
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_information_options
Describes states for a xtd::net::sockets::socket. This enumeration has a flags attribute that allows ...
Definition: socket_information_options.h:25
@ none
none of the socket operations.
@ use_only_overlapped_io
The Socket uses overlapped I/O.
@ listening
The Socket is listening for new connections.
@ non_blocking
The Socket is nonblocking.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17