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_async_operation.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../../ustring.h"
7 
9 #undef accept
11 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
28  none = 0,
30  accept = 1,
32  connect = 2,
34  disconnect = 3,
36  receive = 4,
38  receive_from = 5,
42  send = 7,
44  send_packets = 8,
46  send_to = 9,
47  };
48 
50  inline std::ostream& operator<<(std::ostream& os, socket_async_operation value) {return os << to_string(value, {{socket_async_operation::none, "none"}, {socket_async_operation::accept, "accept"}, {socket_async_operation::connect, "connect"}, {socket_async_operation::disconnect, "disconnect"}, {socket_async_operation::receive, "receive"}, {socket_async_operation::receive_from, "receive_from"}, {socket_async_operation::receive_message_from, "receive_message_from"}, {socket_async_operation::send, "send"}, {socket_async_operation::send_packets, "send_packets"}, {socket_async_operation::send_to, "send_to"}});}
51  inline std::wostream& operator<<(std::wostream& os, socket_async_operation value) {return os << to_string(value, {{socket_async_operation::none, L"none"}, {socket_async_operation::accept, L"accept"}, {socket_async_operation::connect, L"connect"}, {socket_async_operation::disconnect, L"disconnect"}, {socket_async_operation::receive, L"receive"}, {socket_async_operation::receive_from, L"receive_from"}, {socket_async_operation::receive_message_from, L"receive_message_from"}, {socket_async_operation::send, L"send"}, {socket_async_operation::send_packets, L"send_packets"}, {socket_async_operation::send_to, L"send_to"}});}
53  }
54  }
55 }
socket_async_operation
The type of asynchronous socket operation most recently performed with this context object.
Definition: socket_async_operation.h:26
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
@ receive_message_from
A socket receive_message_from operation.
@ none
none of the socket operations.
@ accept
A socket accept operation.
@ send_packets
A socket send_packets operation.
@ disconnect
A socket disconnect operation.
@ receive_from
A socket receive_from operation.
@ connect
A socket connect operation.
@ send_to
A socket send_to operation.
@ receive
A socket receive operation.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17