xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
transmit_file_options.h
Go to the documentation of this file.
1
4#pragma once
5
6#include "../../ustring.h"
7
9#undef disconnect
11
13namespace xtd {
15 namespace net {
17 namespace sockets {
30 disconnect = 0b1,
32 reuse_socket = 0b10,
34 write_behind = 0b100,
36 use_system_thread = 0b1000,
38 use_kernel_apc = 0b100000,
39 };
40
42 inline transmit_file_options& operator^=(transmit_file_options& lhs, transmit_file_options rhs) {lhs = static_cast<transmit_file_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs)); return lhs;}
43 inline transmit_file_options& operator&=(transmit_file_options& lhs, transmit_file_options rhs) {lhs = static_cast<transmit_file_options>(static_cast<int>(lhs) & static_cast<int>(rhs)); return lhs;}
44 inline transmit_file_options& operator|=(transmit_file_options& lhs, transmit_file_options rhs) {lhs = static_cast<transmit_file_options>(static_cast<int>(lhs) | static_cast<int>(rhs)); return lhs;}
45 inline transmit_file_options& operator+=(transmit_file_options& lhs, transmit_file_options rhs) {lhs = static_cast<transmit_file_options>(static_cast<int>(lhs) + static_cast<int>(rhs)); return lhs;}
46 inline transmit_file_options& operator-=(transmit_file_options& lhs, transmit_file_options rhs) {lhs = static_cast<transmit_file_options>(static_cast<int>(lhs) - static_cast<int>(rhs)); return lhs;}
47 inline transmit_file_options operator^(transmit_file_options lhs, transmit_file_options rhs) {return static_cast<transmit_file_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs));}
48 inline transmit_file_options operator&(transmit_file_options lhs, transmit_file_options rhs) {return static_cast<transmit_file_options>(static_cast<int>(lhs) & static_cast<int>(rhs));}
49 inline transmit_file_options operator|(transmit_file_options lhs, transmit_file_options rhs) {return static_cast<transmit_file_options>(static_cast<int>(lhs) | static_cast<int>(rhs));}
50 inline transmit_file_options operator+(transmit_file_options lhs, transmit_file_options rhs) {return static_cast<transmit_file_options>(static_cast<int>(lhs) + static_cast<int>(rhs));}
51 inline transmit_file_options operator-(transmit_file_options lhs, transmit_file_options rhs) {return static_cast<transmit_file_options>(static_cast<int>(lhs) - static_cast<int>(rhs));}
52 inline transmit_file_options operator~(transmit_file_options lhs) {return static_cast<transmit_file_options>(~static_cast<int>(lhs));}
53 inline std::ostream& operator<<(std::ostream& os, transmit_file_options value) {return os << to_string(value, {{transmit_file_options::use_default_worker_thread, "use_default_worker_thread"}, {transmit_file_options::disconnect, "disconnect"}, {transmit_file_options::reuse_socket, "reuse_socket"}, {transmit_file_options::write_behind, "write_behind"}, {transmit_file_options::use_system_thread, "use_system_thread"}, {transmit_file_options::use_kernel_apc, "use_kernel_apc"}});}
54 inline std::wostream& operator<<(std::wostream& os, transmit_file_options value) {return os << to_string(value, {{transmit_file_options::use_default_worker_thread, L"use_default_worker_thread"}, {transmit_file_options::disconnect, L"disconnect"}, {transmit_file_options::reuse_socket, L"reuse_socket"}, {transmit_file_options::write_behind, L"write_behind"}, {transmit_file_options::use_system_thread, L"use_system_thread"}, {transmit_file_options::use_kernel_apc, L"use_kernel_apc"}});}
56 }
57 }
58}
transmit_file_options
The TransmitFileOptions enumeration defines values used in file transfer requests.
Definition transmit_file_options.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
@ reuse_socket
The socket handle may be reused when the request completes. This flag is valid only if xtd::net::sock...
@ write_behind
Complete the file transfer request immediately, without pending. If this flag is specified and the fi...
@ use_system_thread
Use system threads to process long file transfer requests.
@ use_default_worker_thread
Use the default thread to process long file transfer requests.
@ disconnect
Start a transport-level disconnect after all the file data has been queued for transmission....
@ use_kernel_apc
Use kernel asynchronous procedure calls (APCs) instead of worker threads to process long file transfe...
@ disconnect
A socket disconnect operation.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17