TCP connection.
More...
#include "TCPConnection.hpp"
◆ TCPConnection() [1/2]
EPS::TCPConnection::TCPConnection |
( |
void |
| ) |
|
Constructor.
Create a brand new TCP connection object but don't automatically connect the socket anywhere. For example, this is used when the listener needs an object to accept a new connection. Expect EPS::TCPConnection::accepted() to be called once an actual connection has been accepted.
◆ TCPConnection() [2/2]
EPS::TCPConnection::TCPConnection |
( |
const EPS::TCPEP & |
eth_endpoint, |
|
|
const EPS::UUID & |
uuid = boost::uuids::nil_uuid() |
|
) |
| |
Create a brand new TCP connection to the endpoint provided.
◆ ~TCPConnection()
EPS::TCPConnection::~TCPConnection |
( |
void |
| ) |
|
|
virtual |
◆ accepted()
void EPS::TCPConnection::accepted |
( |
void |
| ) |
|
|
virtual |
Call when a connection is accepted to refresh some of the internal values.
Called after a new TCP connection has been accepted by a listener/acceptor.
◆ async_connect()
void EPS::TCPConnection::async_connect |
( |
void |
| ) |
|
|
virtual |
Perform an asynchronous connect to the endpoint specified when the object was constructed.
◆ set_socket_options()
void EPS::TCPConnection::set_socket_options |
( |
void |
| ) |
|
|
virtual |
◆ ec
◆ endpoint
TCPEP EPS::TCPConnection::endpoint |
◆ hull
Hull& EPS::Connection::hull |
|
inherited |
for convenience, keep a reference to the hull that created this connection
◆ id
size_t EPS::Connection::id |
|
inherited |
unique connection id, helpful when logging connection-specific messages
◆ is_mesh
bool EPS::TCPConnection::is_mesh |
is this connection a client<->server connection, or part of the mesh network?
◆ name
std::string EPS::Connection::name |
|
inherited |
convenient name to use for logging
◆ pending_write_deque
Calls to async_write() cannot overlap, so we must store NetBuffers until they can be sent.
◆ socket
boost::asio::ip::tcp::socket EPS::TCPConnection::socket |
TCP socket for this TCP connection.
◆ uuid
UUID EPS::Connection::uuid |
|
inherited |
corresponding UUID for this peer connection
- See also
- EPS::Tracker which uses the uuid as the key
The documentation for this class was generated from the following files: