#include <SocketClient.h>
Classes | |
| struct | Context |
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 |
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) | |
| const SocketClient & | connect (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const |
| const SocketClient & | connect (const SocketAddress &remoteAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const |
| const SocketClient & | connect (const SocketAddress &remoteAddress, const SocketAddress &localAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const |
| std::function< void(SocketConnection *)> & | getOnConnect () |
| const SocketClient & | setOnConnect (const std::function< void(SocketConnection *)> &onConnect, bool initialize=false) const |
| std::function< void(SocketConnection *)> & | getOnConnected () const |
| const SocketClient & | setOnConnected (const std::function< void(SocketConnection *)> &onConnected, bool initialize=false) const |
| std::function< void(SocketConnection *)> & | getOnDisconnect () const |
| const SocketClient & | setOnDisconnect (const std::function< void(SocketConnection *)> &onDisconnect, bool initialize=false) const |
| std::function< void(const std::shared_ptr< AutoConnectControl > &)> & | getOnAutoConnectControl () |
| const SocketClient & | setOnAutoConnectControl (const std::function< void(const std::shared_ptr< AutoConnectControl > &)> &onAutoConnectControl, bool initialize=false) const |
| std::function< void(core::eventreceiver::ConnectEventReceiver *)> & | getOnInitState () const |
| const SocketClient & | setOnInitState (const std::function< void(core::eventreceiver::ConnectEventReceiver *)> &onInitState, bool initialize=false) const |
| std::shared_ptr< SocketContextFactory > | getSocketContextFactory () const |
| Public Member Functions inherited from core::socket::Socket< SocketConnectorT::Config > | |
| Socket (const std::string &name) | |
| 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) | |
| SocketClient (const std::shared_ptr< Config > &config, const std::shared_ptr< Context > &sharedContext) | |
| const SocketClient & | realConnect (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus, unsigned int tries, double retryTimeoutScale) const |
Private Attributes | |
| std::shared_ptr< Context > | sharedContext |
Additional Inherited Members | |
| Protected Member Functions inherited from core::socket::Socket< SocketConnectorT::Config > | |
| Socket & | operator= (const Socket &)=default |
| Protected Attributes inherited from core::socket::Socket< SocketConnectorT::Config > | |
| const 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 112 of file SocketClient.h.
|
inlineprivate |
Definition at line 121 of file SocketClient.h.
|
inline |
Definition at line 127 of file SocketClient.h.
|
inline |
Definition at line 177 of file SocketClient.h.
|
inline |
Definition at line 184 of file SocketClient.h.
|
inlineexplicit |
Definition at line 188 of file SocketClient.h.
|
inline |
Definition at line 293 of file SocketClient.h.
|
inline |
Definition at line 286 of file SocketClient.h.
Referenced by tls::getClient(), legacy::getLegacyClient(), and main().
|
inline |
Definition at line 282 of file SocketClient.h.
Referenced by main().
|
inline |
Definition at line 344 of file SocketClient.h.
|
inline |
Definition at line 301 of file SocketClient.h.
|
inline |
Definition at line 315 of file SocketClient.h.
|
inline |
Definition at line 329 of file SocketClient.h.
|
inline |
Definition at line 367 of file SocketClient.h.
|
inline |
Definition at line 383 of file SocketClient.h.
|
inlineprivate |
Definition at line 193 of file SocketClient.h.
Referenced by core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::connect(), and core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::realConnect().
|
inline |
Definition at line 349 of file SocketClient.h.
|
inline |
Definition at line 305 of file SocketClient.h.
|
inline |
Definition at line 319 of file SocketClient.h.
|
inline |
Definition at line 333 of file SocketClient.h.
|
inline |
Definition at line 371 of file SocketClient.h.
Referenced by main().
|
private |
Definition at line 388 of file SocketClient.h.
Referenced by core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::getOnAutoConnectControl(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::getOnConnect(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::getOnConnected(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::getOnDisconnect(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::getOnInitState(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::getSocketContextFactory(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::setOnAutoConnectControl(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::setOnConnect(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::setOnConnected(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::setOnDisconnect(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::setOnInitState(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::SocketClient(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::SocketClient(), and core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::SocketClient().