9#include "../../ustring.h"
10#include "../ip_address.h"
105 std::vector<byte_t>
buffer() const noexcept;
135 std::vector<byte_t> buffer_;
137 bool end_of_packet_ = false;
139 std::ifstream* file_stream_ =
nullptr;
141 bool delete_file_stream_when_destroy_ = false;
Represents an element in a xtd::net::sockets::send_packets_element array.
Definition: send_packets_element.h:33
size_t count() const noexcept
Gets the count of bytes to be sent.
std::vector< byte_t > buffer() const noexcept
Gets the buffer to be sent if the xtd::net::sockets::send_packets_element object was initialized with...
send_packets_element(const std::vector< byte_t > &buffer)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified b...
send_packets_element(std::ifstream &file_stream, size_t offset, size_t count, bool end_of_packet)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified r...
send_packets_element(const xtd::ustring &file_path)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified f...
send_packets_element(const std::vector< byte_t > &buffer, size_t offset, size_t count, bool end_of_packet)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified r...
std::optional< ifstream_ref > file_stream() const noexcept
Gets the object representation of the file to send if the xtd::net::sockets::send_packets_element obj...
send_packets_element(const xtd::ustring &file_path, size_t offset, size_t count, bool end_of_packet)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified r...
send_packets_element(const xtd::ustring &file_path, size_t offset, size_t count)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified r...
send_packets_element()=default
Initializes a new instance of the xtd::net::sockets::send_packets_element class.
std::reference_wrapper< std::ifstream > ifstream_ref
Represent ta std::ifstream reference.
Definition: send_packets_element.h:36
send_packets_element(const std::vector< byte_t > &buffer, size_t offset, size_t count)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified r...
const xtd::ustring & file_path() const noexcept
Gets the filename of the file to send if the xtd::net::sockets::send_packets_element object was initi...
bool end_of_packet() const noexcept
Gets a bool value that indicates if this element should not be combined with the next element in a si...
send_packets_element(std::ifstream &file_stream)
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified F...
size_t offset() const noexcept
Gets the offset, in bytes, from the beginning of the data buffer or file to the location in the buffe...
Implements the Berkeley sockets interface.
Definition: socket.h:63
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
@ socket
Socket options apply to all sockets.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17