Class that represents one client on server-side.
More...
#include <connected_client.hpp>
Class that represents one client on server-side.
Acts as a gateway to client and makes it possible to transmit messages between client and server.
◆ Role
◆ Role
| Enumerator |
|---|
| RoleClient | |
| RoleServer | |
◆ ConnectedClient()
| kanzi::connect::ConnectedClient::ConnectedClient |
( |
shared_ptr< MessageDispatcher > | dispatcher, |
|
|
int | id = -1 ) |
Constructor.
- Parameters
-
| dispatcher | Message dispatcher, used to send messages in to this client instance. |
| id | Id of the client. |
◆ ~ConnectedClient()
| kanzi::connect::ConnectedClient::~ConnectedClient |
( |
| ) |
|
◆ getAddress()
| const string & kanzi::connect::ConnectedClient::getAddress |
( |
| ) |
const |
Retrieves ip address of the client.
- Returns
- IP address of the client, as string.
◆ getFirstMessageWaitTimerHandle()
| int64_t kanzi::connect::ConnectedClient::getFirstMessageWaitTimerHandle |
( |
| ) |
const |
get handle used to track first message
- Returns
- handle
◆ getId()
| int kanzi::connect::ConnectedClient::getId |
( |
| ) |
const |
Return the internally hold ID, -1 if not configured.
- Returns
- client identifier number.
◆ getMessageDispatcher()
| shared_ptr< MessageDispatcher > kanzi::connect::ConnectedClient::getMessageDispatcher |
( |
| ) |
|
Retrieves message dispatcher of this client.
- Returns
- Message dispatcher for this client.
◆ getName()
| const string & kanzi::connect::ConnectedClient::getName |
( |
| ) |
const |
Retrieves name of the client.
- Returns
- Name of the client.
◆ getProtocol()
| const string & kanzi::connect::ConnectedClient::getProtocol |
( |
| ) |
const |
Retrieves the protocol assigned to a client connection.
- Returns
- the protocol, e.g. "connect.bearer.tcp", "connect.bearer.ssl", "http", "https", ..
◆ getRole()
| Role kanzi::connect::ConnectedClient::getRole |
( |
| ) |
const |
Retrieves the role of an object.
- Returns
- the role
◆ setAddress()
| void kanzi::connect::ConnectedClient::setAddress |
( |
const string & | address | ) |
|
Sets IP address for a client.
- Parameters
-
| address | New IP address for client. |
◆ setFirstMessageWaitTimerHandle()
| void kanzi::connect::ConnectedClient::setFirstMessageWaitTimerHandle |
( |
int64_t | handle | ) |
|
Store a handle used to track first message.
- Parameters
-
◆ setName()
| void kanzi::connect::ConnectedClient::setName |
( |
const string & | name | ) |
|
Sets name for a client.
- Parameters
-
◆ setProtocol()
| void kanzi::connect::ConnectedClient::setProtocol |
( |
const string & | protocol | ) |
|
Sets the protocol for the client.
- Parameters
-
◆ setRole()
| void kanzi::connect::ConnectedClient::setRole |
( |
Role | role | ) |
|
Configure the role.
- Parameters
-
◆ toString()
| string kanzi::connect::ConnectedClient::toString |
( |
| ) |
const |
Get textual information of the client to for example logging purposes.
- Returns
- human readable information about the object.
The documentation for this class was generated from the following file:
- connect/connected_client.hpp