SNode.C
Loading...
Searching...
No Matches
net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args > Class Template Reference

#include <SocketClient.h>

Inheritance diagram for net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >:
Collaboration diagram for net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >:

Public Member Functions

const Superconnect (const std::string &ipOrHostname, uint16_t port, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Superconnect (const std::string &ipOrHostname, uint16_t port, const std::string &bindHost, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Superconnect (const std::string &ipOrHostname, uint16_t port, uint16_t bindPort, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Superconnect (const std::string &ipOrHostname, uint16_t port, const std::string &bindHost, uint16_t bindPort, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
Public Member Functions inherited from core::socket::stream::SocketClient< SocketConnectorT< net::in::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >
const SocketClientconnect (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
std::function< void(SocketConnection *)> & getOnConnect ()
const SocketClientsetOnConnect (const std::function< void(SocketConnection *)> &onConnect, bool initialize=false) const
std::function< void(SocketConnection *)> & getOnConnected () const
const SocketClientsetOnConnected (const std::function< void(SocketConnection *)> &onConnected, bool initialize=false) const
std::function< void(SocketConnection *)> & getOnDisconnect () const
const SocketClientsetOnDisconnect (const std::function< void(SocketConnection *)> &onDisconnect, bool initialize=false) const
std::shared_ptr< SocketContextFactorygetSocketContextFactory () const
Public Member Functions inherited from core::socket::Socket< SocketConnectorT::Config >
 Socket (const std::string &name)
virtual ~Socket ()
ConfiggetConfig () const

Private Types

using Super

Additional Inherited Members

Public Types inherited from core::socket::stream::SocketClient< SocketConnectorT< net::in::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >
using SocketConnection
using SocketAddress
using Config
Public Types inherited from core::socket::Socket< SocketConnectorT::Config >
using Config
Protected Member Functions inherited from core::socket::Socket< SocketConnectorT::Config >
Socketoperator= (const Socket &)=default
Protected Attributes inherited from core::socket::Socket< SocketConnectorT::Config >
std::shared_ptr< Configconfig

Detailed Description

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT, typename SocketContextFactoryT, typename... Args>
class net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >

Definition at line 62 of file SocketClient.h.

Member Typedef Documentation

◆ Super

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT, typename SocketContextFactoryT, typename... Args>
using net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::Super
private
Initial value:
core::socket::stream::
SocketClient<SocketConnectorT<net::in::phy::stream::PhysicalSocketClient, ConfigSocketClientT>, SocketContextFactoryT, Args...>

Definition at line 67 of file SocketClient.h.

Member Function Documentation

◆ connect() [1/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT, typename SocketContextFactoryT, typename... Args>
const Super & net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & ipOrHostname,
uint16_t port,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 75 of file SocketClient.h.

77 {
78 Super::getConfig().Remote::setHost(ipOrHostname).setPort(port);
79
80 return connect(onStatus);
81 }
const Super & connect(const std::string &ipOrHostname, uint16_t port, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const

Referenced by main().

Here is the caller graph for this function:

◆ connect() [2/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT, typename SocketContextFactoryT, typename... Args>
const Super & net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & ipOrHostname,
uint16_t port,
const std::string & bindHost,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 83 of file SocketClient.h.

86 {
87 Super::getConfig().Remote::setHost(ipOrHostname).setPort(port);
88 Super::getConfig().Local::setHost(bindHost);
89
90 return connect(onStatus);
91 }

◆ connect() [3/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT, typename SocketContextFactoryT, typename... Args>
const Super & net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & ipOrHostname,
uint16_t port,
const std::string & bindHost,
uint16_t bindPort,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 103 of file SocketClient.h.

107 {
108 Super::getConfig().Remote::setHost(ipOrHostname).setPort(port);
109 Super::getConfig().Local::setHost(bindHost).setPort(bindPort);
110
111 return connect(onStatus);
112 }

◆ connect() [4/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT, typename SocketContextFactoryT, typename... Args>
const Super & net::in::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & ipOrHostname,
uint16_t port,
uint16_t bindPort,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 93 of file SocketClient.h.

96 {
97 Super::getConfig().Remote::setHost(ipOrHostname).setPort(port);
98 Super::getConfig().Local::setHost(bindPort);
99
100 return connect(onStatus);
101 }

The documentation for this class was generated from the following file: