SNode.C
|
#include <SocketClient.h>
Public Types | |
using | SocketConnection = typename SocketConnector::SocketConnection |
using | SocketAddress = typename SocketConnector::SocketAddress |
Public Types inherited from core::socket::Socket< SocketConnectorT::Config > | |
using | Config |
Public Member Functions | |
SocketClient (const std::string &name, const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, Args &&... args) | |
SocketClient (const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, Args &&... args) | |
SocketClient (const std::string &name, Args &&... args) | |
SocketClient (Args &&... args) | |
void | connect (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const |
void | connect (const SocketAddress &remoteAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const |
void | connect (const SocketAddress &remoteAddress, const SocketAddress &localAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const |
std::function< void(SocketConnection *)> | setOnConnect (const std::function< void(SocketConnection *)> &onConnect) |
std::function< void(SocketConnection *)> | setOnConnected (const std::function< void(SocketConnection *)> &onConnected) |
std::function< void(SocketConnection *)> | setOnDisconnect (const std::function< void(SocketConnection *)> &onDisconnect) |
std::shared_ptr< SocketContextFactory > | getSocketContextFactory () const |
Public Member Functions inherited from core::socket::Socket< SocketConnectorT::Config > | |
Socket (const std::string &name) | |
Socket (const Socket &)=default | |
Socket (Socket &&) noexcept=delete | |
Socket & | operator= (const Socket &)=default |
Socket & | operator= (Socket &&) noexcept=delete |
virtual | ~Socket () |
Config & | getConfig () const |
Private Types | |
using | SocketConnector = SocketConnectorT |
using | SocketContextFactory = SocketContextFactoryT |
using | Super = core::socket::Socket<typename SocketConnector::Config> |
Private Member Functions | |
void | realConnect (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus, unsigned int tries, double retryTimeoutScale) const |
Private Attributes | |
const std::shared_ptr< SocketContextFactory > | socketContextFactory |
std::function< void(SocketConnection *)> | onConnect |
std::function< void(SocketConnection *)> | onConnected |
std::function< void(SocketConnection *)> | onDisconnect |
Additional Inherited Members | |
Protected Attributes inherited from core::socket::Socket< SocketConnectorT::Config > | |
std::shared_ptr< Config > | config |
Sequence diagram showing how a connect to a peer is performed.
Definition at line 48 of file SocketClient.h.
using core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketAddress = typename SocketConnector::SocketAddress |
Definition at line 57 of file SocketClient.h.
using core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketConnection = typename SocketConnector::SocketConnection |
Definition at line 56 of file SocketClient.h.
|
private |
Definition at line 50 of file SocketClient.h.
|
private |
Definition at line 51 of file SocketClient.h.
|
private |
Definition at line 53 of file SocketClient.h.
|
inline |
Definition at line 59 of file SocketClient.h.
|
inline |
Definition at line 71 of file SocketClient.h.
|
inline |
Definition at line 79 of file SocketClient.h.
|
inlineexplicit |
Definition at line 103 of file SocketClient.h.
|
inline |
Definition at line 194 of file SocketClient.h.
|
inline |
Definition at line 187 of file SocketClient.h.
|
inline |
Definition at line 183 of file SocketClient.h.
|
inline |
Definition at line 226 of file SocketClient.h.
|
inlineprivate |
Definition at line 108 of file SocketClient.h.
|
inline |
Definition at line 202 of file SocketClient.h.
|
inline |
Definition at line 210 of file SocketClient.h.
|
inline |
Definition at line 218 of file SocketClient.h.
|
private |
Definition at line 233 of file SocketClient.h.
|
private |
Definition at line 234 of file SocketClient.h.
|
private |
Definition at line 235 of file SocketClient.h.
|
private |
Definition at line 231 of file SocketClient.h.