#include <TcpHelperClasses.h>
|
enum | accepting_state_t {
opened = 0,
connecting = 1,
connected = 2,
halted = 3,
closed = 4
} |
|
using | pointer = std::shared_ptr< TcpAcceptor > |
|
|
static pointer | create (asio::io_context &io_context, asio::ip::tcp::endpoint &ep) |
|
static pointer | create (asio::io_context &io_context, uint16_t port) |
|
◆ ~TcpAcceptor()
helics::tcp::TcpAcceptor::~TcpAcceptor |
( |
| ) |
|
|
inline |
destructor to make sure everything is closed without threading issues
References close().
◆ cancel()
void helics::tcp::TcpAcceptor::cancel |
( |
| ) |
|
|
inline |
cancel pending operations
◆ close()
void helics::tcp::TcpAcceptor::close |
( |
| ) |
|
◆ connect() [1/2]
bool helics::tcp::TcpAcceptor::connect |
( |
| ) |
|
connect the acceptor to the socket
◆ connect() [2/2]
bool helics::tcp::TcpAcceptor::connect |
( |
std::chrono::milliseconds |
timeOut | ) |
|
connect the acceptor to the socket if disconnected and try up to timeout
◆ create()
static pointer helics::tcp::TcpAcceptor::create |
( |
asio::io_context & |
io_context, |
|
|
asio::ip::tcp::endpoint & |
ep |
|
) |
| |
|
inlinestatic |
create an RxConnection object using the specified context and bufferSize
◆ isAccepting()
bool helics::tcp::TcpAcceptor::isAccepting |
( |
| ) |
const |
|
inline |
check if the acceptor is current accepting new connections
◆ isConnected()
bool helics::tcp::TcpAcceptor::isConnected |
( |
| ) |
const |
|
inline |
check if the acceptor is ready to begin accepting
◆ set_option()
template<class X >
void helics::tcp::TcpAcceptor::set_option |
( |
const X & |
option | ) |
|
|
inline |
set an option on the underlying acceptor
◆ setAcceptCall()
void helics::tcp::TcpAcceptor::setAcceptCall |
( |
std::function< void(TcpAcceptor::pointer, TcpConnection::pointer)> |
accFunc | ) |
|
|
inline |
set the callback for the data object
◆ setErrorCall()
void helics::tcp::TcpAcceptor::setErrorCall |
( |
std::function< bool(TcpAcceptor::pointer, const std::error_code &)> |
errorFunc | ) |
|
|
inline |
set the error path callback
◆ start()
bool helics::tcp::TcpAcceptor::start |
( |
TcpConnection::pointer |
conn | ) |
|
start the acceptor
References error.
◆ to_string()
std::string helics::tcp::TcpAcceptor::to_string |
( |
| ) |
const |
generate a string from the associated endpoint
The documentation for this class was generated from the following files: