|
| client ()=delete |
| Default constructor (deleted)
|
| client (_Server &server) |
| Constructor with server reference.
|
| ~client ()=default |
| Destructor.
|
_Server & | server () |
| Get the associated server.
|
_Server & | server () const |
| Get the associated server (const version)
|
uuid const & | id () const noexcept |
| Get the client's unique identifier.
|
auto | shared () const |
| Get the client as a shared pointer.
|
auto | ip () const |
| Get the client's IP address.
|
auto | port () const |
| Get the client's port.
|
template<typename... _Args> |
auto & | publish (_Args &&...args) noexcept |
| < Import the transport method from the transport
|
| io ()=default |
| Default constructor.
|
| io (IProtocol *protocol) noexcept |
| Constructor with an initial protocol instance.
|
| io (io const &)=delete |
| Deleted copy constructor.
|
| ~io () noexcept |
| Destructor.
|
template<typename _Protocol, typename... _Args> |
_Protocol * | switch_protocol (_Args &&...args) |
| Switches to a new protocol for I/O processing, taking ownership.
|
void | clear_protocols () |
| Clears all owned protocol instances.
|
IProtocol * | protocol () |
| Gets a pointer to the current active protocol instance.
|
void | start () noexcept |
| Starts bidirectional asynchronous I/O operations.
|
void | ready_to_read () noexcept |
| Ensures the I/O watcher is listening for read events (EV_READ).
|
void | ready_to_write () noexcept |
| Ensures the I/O watcher is listening for write events (EV_WRITE).
|
void | close_after_deliver () const noexcept |
| Requests connection closure after all pending output data is delivered.
|
template<typename... _Args> |
auto & | publish (_Args &&...args) noexcept |
| Publishes data to the output buffer and ensures write readiness.
|
template<typename T> |
auto & | operator<< (T &&data) |
| Stream operator for publishing data.
|
void | disconnect (int reason=1) |
| Initiates a graceful disconnection.
|
template<typename _Derived, typename _Transport, typename _Server = void>
class qb::io::async::tcp::client< _Derived, _Transport, _Server >
Server-associated asynchronous TCP client.
Standalone asynchronous TCP client specialization without server association.
This specialization of the client template is used for clients that are associated with a server, typically created when a connection is accepted. It maintains a reference to the server and has a unique identifier.
- Template Parameters
-
_Derived | The derived class type (CRTP pattern) |
_Transport | The transport class type |
_Server | The server class type |
This specialization of the client template is used for standalone clients that are not associated with any server, typically for outgoing connections. It includes all the basic functionality of the generic client but without server-specific features.
- Template Parameters
-
_Derived | The derived class type (CRTP pattern) |
_Transport | The transport layer implementation type |