Represents an element in a xtd::net::sockets::send_packets_element array.
Public Aliases | |
| using | ifstream_ref |
| Represent ta std::ifstream reference. | |
Public Constructors | |
| send_packets_element ()=default | |
| Initializes a new instance of the xtd::net::sockets::send_packets_element class. | |
| send_packets_element (const xtd::array< 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, xtd::usize offset, xtd::usize 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 xtd::array< xtd::byte > &buffer, xtd::usize offset, xtd::usize 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, xtd::usize offset, xtd::usize 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, xtd::usize offset, xtd::usize 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::array< xtd::byte > &buffer, xtd::usize offset, xtd::usize 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. | |
Public Properties | |
| auto | buffer () const noexcept -> xtd::array< xtd::byte > |
| Gets the buffer to be sent if the xtd::net::sockets::send_packets_element object was initialized with a buffer parameter. | |
| auto | count () const noexcept -> xtd::usize |
| Gets the count of bytes to be sent. | |
| auto | end_of_packet () const noexcept -> bool |
| 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. | |
| auto | file_path () const noexcept -> const xtd::string & |
| Gets the filename of the file to send if the xtd::net::sockets::send_packets_element object was initialized with a file_path parameter. | |
| auto | file_stream () const noexcept -> std::optional< ifstream_ref > |
| 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. | |
| auto | offset () const noexcept -> xtd::usize |
| 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. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | equals (const object &obj) const noexcept -> bool |
| Determines whether the specified object is equal to the current object. | |
| virtual auto | get_hash_code () const noexcept -> xtd::usize |
| Serves as a hash function for a particular type. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
Represent ta std::ifstream reference.
|
default |
Initializes a new instance of the xtd::net::sockets::send_packets_element class.
|
explicit |
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::string & | file_path, |
| xtd::usize | offset, | ||
| xtd::usize | 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 xtd::array< xtd::byte > & | buffer, |
| xtd::usize | offset, | ||
| xtd::usize | 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::string & | file_path, |
| xtd::usize | offset, | ||
| xtd::usize | 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, |
| xtd::usize | offset, | ||
| xtd::usize | 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 xtd::array< xtd::byte > & | buffer, |
| xtd::usize | offset, | ||
| xtd::usize | 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. |
|
explicit |
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. |
|
explicit |
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. |
|
nodiscardnoexcept |
Gets the buffer to be sent if the xtd::net::sockets::send_packets_element object was initialized with a buffer parameter.
|
nodiscardnoexcept |
Gets the count of bytes to be sent.
|
nodiscardnoexcept |
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.
|
nodiscardnoexcept |
Gets the filename of the file to send if the xtd::net::sockets::send_packets_element object was initialized with a file_path parameter.
|
nodiscardnoexcept |
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.
|
nodiscardnoexcept |
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.