Class that represents one client on server-side. More...
#include <connected_client.hpp>
Public Types | |
| enum | Role { RoleClient, RoleServer } |
| typedef enum kanzi::connect::ConnectedClient::Role | Role |
Public Member Functions | |
| ConnectedClient (shared_ptr< MessageDispatcher > dispatcher, int id=-1) | |
| Constructor. More... | |
| const string & | getAddress () const |
| Retrieves ip address of the client. More... | |
| int64_t | getFirstMessageWaitTimerHandle () const |
| get handle used to track first message More... | |
| int | getId () const |
| Return the internally hold ID, -1 if not configured. More... | |
| shared_ptr< MessageDispatcher > | getMessageDispatcher () |
| Retrieves message dispatcher of this client. More... | |
| const string & | getName () const |
| Retrieves name of the client. More... | |
| const string & | getProtocol () const |
| Retrieves the protocol assigned to a client connection. More... | |
| Role | getRole () const |
| Retrieves the role of an object. More... | |
| void | setAddress (const string &address) |
| Sets IP address for a client. More... | |
| void | setFirstMessageWaitTimerHandle (int64_t handle) |
| Store a handle used to track first message. More... | |
| void | setName (const string &name) |
| Sets name for a client. More... | |
| void | setProtocol (const string &protocol) |
| Sets the protocol for the client. More... | |
| void | setRole (Role role) |
| Configure the role. More... | |
| string | toString () const |
| Get textual information of the client to for example logging purposes. More... | |
| ~ConnectedClient () | |
| Destructor. More... | |
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.
| kanzi::connect::ConnectedClient::ConnectedClient | ( | shared_ptr< MessageDispatcher > | dispatcher, |
| int | id = -1 |
||
| ) |
Constructor.
| dispatcher | Message dispatcher, used to send messages in to this client instance. |
| id | Id of the client. |
| kanzi::connect::ConnectedClient::~ConnectedClient | ( | ) |
Destructor.
| const string& kanzi::connect::ConnectedClient::getAddress | ( | ) | const |
Retrieves ip address of the client.
| int64_t kanzi::connect::ConnectedClient::getFirstMessageWaitTimerHandle | ( | ) | const |
get handle used to track first message
| int kanzi::connect::ConnectedClient::getId | ( | ) | const |
Return the internally hold ID, -1 if not configured.
| shared_ptr<MessageDispatcher> kanzi::connect::ConnectedClient::getMessageDispatcher | ( | ) |
Retrieves message dispatcher of this client.
| const string& kanzi::connect::ConnectedClient::getName | ( | ) | const |
Retrieves name of the client.
| const string& kanzi::connect::ConnectedClient::getProtocol | ( | ) | const |
Retrieves the protocol assigned to a client connection.
| Role kanzi::connect::ConnectedClient::getRole | ( | ) | const |
Retrieves the role of an object.
| void kanzi::connect::ConnectedClient::setAddress | ( | const string & | address | ) |
Sets IP address for a client.
| address | New IP address for client. |
| void kanzi::connect::ConnectedClient::setFirstMessageWaitTimerHandle | ( | int64_t | handle | ) |
Store a handle used to track first message.
| handle | the handle |
| void kanzi::connect::ConnectedClient::setName | ( | const string & | name | ) |
Sets name for a client.
| name | New name for client. |
| void kanzi::connect::ConnectedClient::setProtocol | ( | const string & | protocol | ) |
Sets the protocol for the client.
| protocol | the protocol |
| void kanzi::connect::ConnectedClient::setRole | ( | Role | role | ) |
Configure the role.
| role | the role. |
| string kanzi::connect::ConnectedClient::toString | ( | ) | const |
Get textual information of the client to for example logging purposes.