| SNode.C
    | 
#include <SocketClient.h>
| Public Types | |
| using | SocketConnection = typename SocketConnector::SocketConnection | 
| using | SocketAddress = typename SocketConnector::SocketAddress | 
| using | Config = typename SocketConnector::Config | 
|  Public Types inherited from core::socket::Socket< SocketConnectorT::Config > | |
| using | Config = SocketConnectorT::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 *)> & | getOnConnect () | 
| std::function< void(SocketConnection *)> | setOnConnect (const std::function< void(SocketConnection *)> &onConnect, bool initialize=false) | 
| std::function< void(SocketConnection *)> & | getOnConnected () | 
| std::function< void(SocketConnection *)> | setOnConnected (const std::function< void(SocketConnection *)> &onConnected, bool initialize=false) | 
| std::function< void(SocketConnection *)> & | getOnDisconnect () | 
| std::function< void(SocketConnection *)> | setOnDisconnect (const std::function< void(SocketConnection *)> &onDisconnect, bool initialize=false) | 
| std::shared_ptr< SocketContextFactory > | getSocketContextFactory () const | 
|  Public Member Functions inherited from core::socket::Socket< SocketConnectorT::Config > | |
| Socket (const std::string &name) | |
| Socket (const std::shared_ptr< Config > &config) | |
| Socket (Socket &&) noexcept=delete | |
| 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 | |
| SocketClient (const std::shared_ptr< Config > &config, const std::shared_ptr< SocketContextFactory > &socketContextFactory, const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect) | |
| 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 Member Functions inherited from core::socket::Socket< SocketConnectorT::Config > | |
| Socket (const Socket &)=default | |
| Socket & | operator= (const Socket &)=default | 
|  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 73 of file SocketClient.h.
| using core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::Config = typename SocketConnector::Config | 
Definition at line 83 of file SocketClient.h.
| using core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketAddress = typename SocketConnector::SocketAddress | 
Definition at line 82 of file SocketClient.h.
| using core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketConnection = typename SocketConnector::SocketConnection | 
Definition at line 81 of file SocketClient.h.
| 
 | private | 
Definition at line 75 of file SocketClient.h.
| 
 | private | 
Definition at line 76 of file SocketClient.h.
| 
 | private | 
Definition at line 78 of file SocketClient.h.
| 
 | inlineprivate | 
Definition at line 86 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnect, core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnected, core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onDisconnect, and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::socketContextFactory.
| 
 | inline | 
Definition at line 99 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnect, and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::socketContextFactory.
| 
 | inline | 
Definition at line 148 of file SocketClient.h.
| 
 | inline | 
Definition at line 156 of file SocketClient.h.
| 
 | inlineexplicit | 
Definition at line 160 of file SocketClient.h.
| 
 | inline | 
Definition at line 260 of file SocketClient.h.
| 
 | inline | 
Definition at line 253 of file SocketClient.h.
Referenced by tls::getClient(), legacy::getLegacyClient(), and main().
| 
 | inline | 
Definition at line 249 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect().
Referenced by main().
| 
 | inline | 
Definition at line 268 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnect.
| 
 | inline | 
Definition at line 284 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnected.
| 
 | inline | 
Definition at line 300 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onDisconnect.
| 
 | inline | 
Definition at line 316 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::socketContextFactory.
| 
 | inlineprivate | 
Definition at line 165 of file SocketClient.h.
References core::socket::State::ERROR, core::eventLoopState(), core::socket::State::FATAL, utils::Random::getInRange(), core::INITIALIZED, core::socket::State::NO_RETRY, core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnect, core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnected, core::socket::State::operator&(), core::socket::State::operator&=(), core::socket::State::operator==(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect(), core::RUNNING, core::timer::Timer::singleshotTimer(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::socketContextFactory, and core::SNodeC::state().
Referenced by core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::connect(), and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect().
| 
 | inline | 
Definition at line 272 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnect.
| 
 | inline | 
Definition at line 288 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onConnected.
| 
 | inline | 
Definition at line 304 of file SocketClient.h.
References core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::onDisconnect.
| 
 | private | 
Definition at line 323 of file SocketClient.h.
Referenced by core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::getOnConnect(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::setOnConnect(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketClient(), and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketClient().
| 
 | private | 
Definition at line 324 of file SocketClient.h.
Referenced by core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::getOnConnected(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::setOnConnected(), and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketClient().
| 
 | private | 
Definition at line 325 of file SocketClient.h.
Referenced by core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::getOnDisconnect(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::setOnDisconnect(), and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketClient().
| 
 | private | 
Definition at line 321 of file SocketClient.h.
Referenced by core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::getSocketContextFactory(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect(), core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketClient(), and core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::SocketClient().