#include <src/rest/connection.hpp>
This class implements a Connection class of each socket connection.
◆ Connection()
otbr::rest::Connection::Connection |
( |
steady_clock::time_point |
aStartTime, |
|
|
Resource * |
aResource, |
|
|
int |
aFd |
|
) |
| |
The constructor is to initialize a socket connection instance.
- Parameters
-
[in] | aStartTime | The reference start time of a connection which is set when created for the first time and maybe reset when transfer to wait callback or wait write state. |
[in] | aResource | A pointer to the resource handler. |
[in] | aFd | The file descriptor for the connection. |
◆ ~Connection()
otbr::rest::Connection::~Connection |
( |
void |
| ) |
|
|
override |
The desctructor destroys the connection instance.
◆ Init()
void otbr::rest::Connection::Init |
( |
void |
| ) |
|
This method initializes the connection.
◆ IsComplete()
bool otbr::rest::Connection::IsComplete |
( |
void |
| ) |
const |
This method indicates whether this connection no longer need to be processed.
- Return values
-
TRUE | This connection could be released in next loop. |
FALSE | This connection still needs to be processed in next loop. |
◆ Process()
This method processes mainloop events.
- Parameters
-
[in] | aMainloop | A reference to the mainloop context. |
Implements otbr::MainloopProcessor.
◆ Update()
This method updates the mainloop context.
- Parameters
-
[in,out] | aMainloop | A reference to the mainloop to be updated. |
Implements otbr::MainloopProcessor.
The documentation for this class was generated from the following files: