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.
|
#include <send_packets_element.h>
Represents an element in a xtd::net::sockets::send_packets_element array.
Inherits xtd::object.
Public Types | |
using | ifstream_ref = std::reference_wrapper< std::ifstream > |
Represent ta std::ifstream reference. | |
Public Member Functions | |
send_packets_element ()=default | |
Initializes a new instance of the xtd::net::sockets::send_packets_element class. | |
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 buffer. | |
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 range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport. | |
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 range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport. | |
send_packets_element (const xtd::ustring &file_path) | |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified file. | |
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 range of the file with an option to combine this element with the next element in a single send request from the sockets layer to the transport. | |
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 range of the file with an option to combine this element with the next element in a single send request from the sockets layer to the transport. | |
send_packets_element (std::ifstream &file_stream) | |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified FileStream object. | |
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 range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport. | |
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 a buffer parameter. | |
size_t | count () const noexcept |
Gets the count of bytes to be sent. | |
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 single send request from the sockets layer to the transport. | |
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 initialized with a file_path parameter. | |
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 object was initialized with a std::ifstream parameter. | |
size_t | offset () const noexcept |
Gets the offset, in bytes, from the beginning of the data buffer or file to the location in the buffer or file to start sending the data. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
using xtd::net::sockets::send_packets_element::ifstream_ref = std::reference_wrapper<std::ifstream> |
Represent ta std::ifstream reference.
|
default |
Initializes a new instance of the xtd::net::sockets::send_packets_element class.
xtd::net::sockets::send_packets_element::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 buffer.
buffer | A byte array of data to send using the xtd::net::sockets::socket::send_packets_async method. |
xtd::net::sockets::send_packets_element::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 range of the file with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
file_path | The filename of the file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
offset | The offset, in bytes, from the beginning of the file to the location in the file to start sending the file specified in the file_path parameter. |
count | The number of bytes to send starting from the offset parameter. If count is zero, the entire file is sent. |
end_of_packet | Specifies that this element should not be combined with the next element in a single send request from the sockets layer to the transport. This flag is used for granular control of the content of each message on a datagram or message-oriented socket. |
xtd::net::sockets::send_packets_element::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 range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
buffer | A byte array of data to send using the xtd::net::sockets::socket::send_packets_async method. |
offset | The offset, in bytes, from the beginning of the buffer to the location in the buffer to start sending the data specified in the buffer parameter. |
count | The number bytes to send starting from the offset parameter. If count is zero, no bytes are sent. |
end_of_packet | Specifies that this element should not be combined with the next element in a single send request from the sockets layer to the transport. This flag is used for granular control of the content of each message on a datagram or message-oriented socket. |
xtd::net::sockets::send_packets_element::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 range of the file with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
file_path | The filename of the file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
offset | The offset, in bytes, from the beginning of the file to the location in the file to start sending the file specified in the file_path parameter. |
count | The number of bytes to send starting from the offset parameter. If count is zero, the entire file is sent. |
xtd::net::sockets::send_packets_element::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 range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
file_stream | The file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
offset | The offset, in bytes, from the beginning of the file to the location in the file to start sending the bytes in the file. |
count | The number of bytes to send starting from the offset parameter. If count is zero, the entire file is sent. |
end_of_packet | Specifies that this element should not be combined with the next element in a single send request from the sockets layer to the transport. This flag is used for granular control of the content of each message on a datagram or message-oriented socket. |
xtd::net::sockets::send_packets_element::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 range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
buffer | A byte array of data to send using the xtd::net::sockets::socket::send_packets_async method. |
offset | The offset, in bytes, from the beginning of the buffer to the location in the buffer to start sending the data specified in the buffer parameter. |
count | The number bytes to send starting from the offset parameter. If count is zero, no bytes are sent. |
xtd::net::sockets::send_packets_element::send_packets_element | ( | const xtd::ustring & | file_path | ) |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified file.
file_path | The filename of the file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
xtd::net::sockets::send_packets_element::send_packets_element | ( | std::ifstream & | file_stream | ) |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified FileStream object.
file_stream | The file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
|
noexcept |
Gets the buffer to be sent if the xtd::net::sockets::send_packets_element object was initialized with a buffer parameter.
|
noexcept |
Gets the count of bytes to be sent.
|
noexcept |
Gets a bool value that indicates if this element should not be combined with the next element in a single send request from the sockets layer to the transport.
|
noexcept |
Gets the filename of the file to send if the xtd::net::sockets::send_packets_element object was initialized with a file_path parameter.
|
noexcept |
Gets the object representation of the file to send if the xtd::net::sockets::send_packets_element object was initialized with a std::ifstream parameter.
|
noexcept |
Gets the offset, in bytes, from the beginning of the data buffer or file to the location in the buffer or file to start sending the data.