Connection class.
More...
#include <connection.h>
|
| | Connection (boost::asio::ip::tcp::socket &&_socket, database_ptr _db) |
| | Construct a new Connection object. More...
|
| |
| void | reuse (boost::asio::ip::tcp::socket &&_socket) override |
| | reuse connection for Object Pool More...
|
| |
|
virtual void | start () override |
| | Entry point to handle incoming requests.
|
| |
| virtual void | sendme (text_response_ptr response) override |
| | Send response message to the client. More...
|
| |
| virtual identifier_t | get_client_id () const override |
| | Get the client id object. More...
|
| |
| virtual const std::string & | get_login () const override |
| | Get the login. More...
|
| |
|
virtual bool | is_busy () const noexceptoverride |
| |
|
virtual void | set_busy (bool flag=true) noexceptoverride |
| |
|
virtual void | free_connection () override |
| |
Connection class.
It serves connected tcp client
| Connection::Connection |
( |
boost::asio::ip::tcp::socket && |
_socket, |
|
|
database_ptr |
_db |
|
) |
| |
|
inlineexplicit |
Construct a new Connection object.
- Parameters
-
| _socket | Accepted client socket. |
| _db | |
| virtual identifier_t Connection::get_client_id |
( |
| ) |
const |
|
inlineoverridevirtual |
Get the client id object.
Returns current client id
- Returns
- identifier_t
Implements ISubscriber.
| virtual const std::string& Connection::get_login |
( |
| ) |
const |
|
inlineoverridevirtual |
Get the login.
Return client's login
- Returns
- const std::string&
Implements ISubscriber.
| void Connection::reuse |
( |
boost::asio::ip::tcp::socket && |
_socket | ) |
|
|
overridevirtual |
reuse connection for Object Pool
- Parameters
-
| _socket | Accepted client socket. |
Implements ISubscriber.
| void Connection::sendme |
( |
text_response_ptr |
response | ) |
|
|
overridevirtual |
Send response message to the client.
- Parameters
-
| response | response needs to be sent |
Implements ISubscriber.
The documentation for this class was generated from the following files:
- src/server/connection/connection.h
- src/server/connection/connection.cpp