xtd 0.2.0
Loading...
Searching...
No Matches

◆ transmit_file_options

The TransmitFileOptions enumeration defines values used in file transfer requests.

transmit_file_options
The TransmitFileOptions enumeration defines values used in file transfer requests.
Definition transmit_file_options.h:32
Header
#include <xtd/net/sockets/transmit_file_options>
Namespace
xtd::net::sockets
Library
xtd.core
Remarks
This enumeration has a flags attribute that allows a bitwise combination of its member values.
Note
The flags xtd::net::sockets::transmit_file_options::disconnect and xtd::net::sockets::transmit_file_options::reuse_socket return the socket to a disconnected, reusable state after the file has been transmitted. These flags should not be used on a socket where quality of service (QOS) has been requested, because the service provider might immediately delete any quality of service associated with the socket before the file transfer has completed. The best approach for a QOS-enabled socket is to call xtd::net::sockets::socket::close when the file transfer has completed, rather than relying on these flags.
Enumerator
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. When used with xtd::net::sockets::transmit_file_options::reuse_socket, these flags return the socket to a disconnected, reusable state after the file has been transmitted.

reuse_socket 

The socket handle may be reused when the request completes. This flag is valid only if xtd::net::sockets::transmit_file_options::disconnect is also specified. When used with xtd::net::sockets::transmit_file_options::disconnect, these flags return the socket to a disconnected, reusable state after the file has been transmitted.

write_behind 

Complete the file transfer request immediately, without pending. If this flag is specified and the file transfer succeeds, the data has been accepted by the system but not necessarily acknowledged by the remote end. Do not use this flag with the xtd::net::sockets::transmit_file_options::disconnect and xtd::net::sockets::transmit_file_options::reuse_socket flags.

use_system_thread 

Use system threads to process long file transfer requests.

use_kernel_apc 

Use kernel asynchronous procedure calls (APCs) instead of worker threads to process long file transfer requests. Long requests are defined as requests that require more than a single read from the file or a cache; the request therefore depends on the size of the file and the specified length of the send packet.