|
qb
2.0.0.0
C++17 Actor Framework
|
TCP transport providing reliable, stream-based network communication. More...
#include <tcp.h>


Public Member Functions | |
| constexpr bool | is_secure () const noexcept |
| Indicates that this transport implementation is not secure. | |
| Public Member Functions inherited from qb::io::stream< io::tcp::socket > | |
| output_buffer_type & | out () noexcept |
| Get the output buffer. | |
| std::size_t | pendingWrite () const noexcept |
| Get the number of bytes pending for writing. | |
| int | write (std::enable_if_t< has_method_write< io::tcp::socket, int, const char *, std::size_t >::value, Available > *=nullptr) noexcept |
| Write data from the output buffer to the transport. | |
| char * | publish (char const *data, std::size_t size) noexcept |
| Add data to the output buffer for later writing. | |
| void | close () noexcept |
| Close the stream. | |
| Public Member Functions inherited from qb::io::istream< io::tcp::socket > | |
| ~istream () noexcept | |
| Destructor. | |
| io::tcp::socket & | transport () noexcept |
| Get the underlying transport object. | |
| input_buffer_type & | in () noexcept |
| Get the input buffer. | |
| std::size_t | pendingRead () const noexcept |
| Get the number of bytes available for reading. | |
| int | read (std::enable_if_t< has_method_read< io::tcp::socket, int, char *, std::size_t >::value, Available > *=nullptr) noexcept |
| Read data from the transport into the input buffer. | |
| void | flush (std::size_t size) noexcept |
| Remove data from the front of the input buffer. | |
| void | eof () noexcept |
| Handle end-of-file condition. | |
| void | close () noexcept |
| Close the stream. | |
Additional Inherited Members | |
| Public Types inherited from qb::io::stream< io::tcp::socket > | |
| using | transport_io_type |
| Type of the underlying transport IO. | |
| using | output_buffer_type |
| Type of the output buffer. | |
| Public Types inherited from qb::io::istream< io::tcp::socket > | |
| using | transport_io_type |
| Type of the underlying transport IO. | |
| using | input_buffer_type |
| Type of the input buffer. | |
| Static Public Attributes inherited from qb::io::stream< io::tcp::socket > | |
| static constexpr const bool | has_reset_on_pending_read |
| Flag indicating whether the implementation resets pending reads. | |
| Protected Attributes inherited from qb::io::stream< io::tcp::socket > | |
| output_buffer_type | _out_buffer |
| Buffer for outgoing data. | |
| Protected Attributes inherited from qb::io::istream< io::tcp::socket > | |
| io::tcp::socket | _in |
| The underlying IO object. | |
| input_buffer_type | _in_buffer |
| Buffer for incoming data. | |
TCP transport providing reliable, stream-based network communication.
This class implements a transport layer for TCP sockets by extending the generic qb::io::stream class, specializing it with qb::io::tcp::socket as the underlying I/O mechanism. It inherits all stream functionality for buffered reading and writing and applies it to TCP connections (IPv4, IPv6, or Unix Sockets).