Client Session that will handle every client's event.
More...
#include <ClientSession.hpp>
|
| ClientSession (asio::io_context &IOContext) |
|
| ~ClientSession () |
|
asio::ip::tcp::socket & | getSocket () |
| Get the socket of the client session. More...
|
|
void | start () |
| start that will waiting for a message from the client More...
|
|
std::shared_ptr< ClientSession > | get () |
| Get the pointer of 'this' object. More...
|
|
void | handleRead (const asio::error_code &error, std::size_t transferredBytes) |
| handles the asynchronous wait on read for the client session More...
|
|
void | handleWrite (const asio::error_code &error) |
| handles the asynchronous wait on write to the client session More...
|
|
Client Session that will handle every client's event.
◆ ClientSession()
RType::Server::ClientSession::ClientSession |
( |
asio::io_context & |
IOContext | ) |
|
◆ ~ClientSession()
RType::Server::ClientSession::~ClientSession |
( |
| ) |
|
◆ get()
Get the pointer of 'this' object.
- Returns
- 'this'
◆ getSocket()
asio::ip::tcp::socket & RType::Server::ClientSession::getSocket |
( |
| ) |
|
Get the socket of the client session.
- Returns
- the client asio::ip::tcp::socket
◆ handleRead()
void RType::Server::ClientSession::handleRead |
( |
const asio::error_code & |
error, |
|
|
std::size_t |
transferredBytes |
|
) |
| |
handles the asynchronous wait on read for the client session
- Parameters
-
error | checked if error occures |
transferredBytes | corresponding to the received bytes from client |
◆ handleWrite()
void RType::Server::ClientSession::handleWrite |
( |
const asio::error_code & |
error | ) |
|
handles the asynchronous wait on write to the client session
- Parameters
-
error | checked if error occures |
◆ start()
void RType::Server::ClientSession::start |
( |
| ) |
|
start that will waiting for a message from the client
The documentation for this class was generated from the following files: