Represents an element in a xtd::net::sockets::send_packets_element array.
Represents an element in a xtd::net::sockets::send_packets_element array.
Definition send_packets_element.h:41
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define core_export_
Define shared library export.
Definition core_export.h:13
- Inheritance
- xtd::object → xtd::net::sockets::send_packets_element
- Header
#include <xtd/net/sockets/send_packets_element>
- Namespace
- xtd::net::sockets
- Library
- xtd.core
|
using | ifstream_ref = std::reference_wrapper< std::ifstream > |
| Represent ta std::ifstream reference.
|
|
|
| send_packets_element ()=default |
| Initializes a new instance of the xtd::net::sockets::send_packets_element class.
|
|
| send_packets_element (const std::vector< xtd::byte > &buffer) |
| Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified buffer.
|
|
| send_packets_element (const xtd::string &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 (const std::vector< xtd::byte > &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::string &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 (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.
|
|
| send_packets_element (const std::vector< xtd::byte > &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 xtd::string &file_path) |
| Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified file.
|
|
| 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.
|
|
|
std::vector< xtd::byte > | 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::string & | 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.
|
|
|
| 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.
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance.
|
|
template<typename object_t > |
xtd::uptr< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object.
|
|
virtual xtd::string | to_string () const noexcept |
| Returns a xtd::string that represents the current object.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance.
|
|
◆ ifstream_ref
Represent ta std::ifstream reference.
◆ send_packets_element() [1/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
| ) |
|
|
default |
◆ send_packets_element() [2/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
const std::vector< xtd::byte > & |
buffer | ) |
|
|
explicit |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified buffer.
- Parameters
-
buffer | A byte array of data to send using the xtd::net::sockets::socket::send_packets_async method. |
◆ send_packets_element() [3/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
const xtd::string & |
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.
- Parameters
-
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. |
◆ send_packets_element() [4/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
const std::vector< xtd::byte > & |
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.
- Parameters
-
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. |
◆ send_packets_element() [5/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
const xtd::string & |
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.
- Parameters
-
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. |
◆ send_packets_element() [6/9]
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.
- Parameters
-
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. |
◆ send_packets_element() [7/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
const std::vector< xtd::byte > & |
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.
- Parameters
-
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. |
◆ send_packets_element() [8/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
const xtd::string & |
file_path | ) |
|
|
explicit |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified file.
- Parameters
-
file_path | The filename of the file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
◆ send_packets_element() [9/9]
xtd::net::sockets::send_packets_element::send_packets_element |
( |
std::ifstream & |
file_stream | ) |
|
|
explicit |
Initializes a new instance of the xtd::net::sockets::send_packets_element class using the specified FileStream object.
- Parameters
-
file_stream | The file to be transmitted using the xtd::net::sockets::socket::send_packets_async method. |
◆ buffer()
std::vector< xtd::byte > xtd::net::sockets::send_packets_element::buffer |
( |
| ) |
const |
|
noexcept |
◆ count()
size_t xtd::net::sockets::send_packets_element::count |
( |
| ) |
const |
|
noexcept |
◆ end_of_packet()
bool xtd::net::sockets::send_packets_element::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.
- Returns
- A bool value that indicates if this element should not be combined with the next element in a single send request.
◆ file_path()
const xtd::string & xtd::net::sockets::send_packets_element::file_path |
( |
| ) |
const |
|
noexcept |
◆ file_stream()
std::optional< ifstream_ref > xtd::net::sockets::send_packets_element::file_stream |
( |
| ) |
const |
|
noexcept |
◆ offset()
size_t xtd::net::sockets::send_packets_element::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.
- Returns
- 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.
The documentation for this class was generated from the following file: