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

#include <SocketClient.h>

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

Public Member Functions

void connect (const std::string &btAddress, uint8_t channel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
 
void connect (const std::string &btAddress, uint8_t channel, const std::string &bindBtAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
 
void connect (const std::string &btAddress, uint8_t channel, uint8_t bindChannel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
 
void connect (const std::string &btAddress, uint8_t channel, const std::string &bindBtAddress, uint8_t bindChannel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
 
- Public Member Functions inherited from core::socket::stream::SocketClient< SocketConnectorT< net::rc::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >
 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< SocketContextFactorygetSocketContextFactory () const
 
- Public Member Functions inherited from core::socket::Socket< SocketConnectorT::Config >
 Socket (const std::string &name)
 
 Socket (const Socket &)=default
 
 Socket (Socket &&) noexcept=delete
 
Socketoperator= (const Socket &)=default
 
Socketoperator= (Socket &&) noexcept=delete
 
virtual ~Socket ()
 
ConfiggetConfig () const
 

Private Types

using Super
 

Additional Inherited Members

- Public Types inherited from core::socket::stream::SocketClient< SocketConnectorT< net::rc::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >
using SocketConnection
 
using SocketAddress
 
- Public Types inherited from core::socket::Socket< SocketConnectorT::Config >
using Config
 
- 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::rc::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >

Definition at line 40 of file SocketClient.h.

Member Typedef Documentation

◆ Super

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

Definition at line 45 of file SocketClient.h.

Member Function Documentation

◆ connect() [1/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT , typename SocketContextFactoryT , typename... Args>
void net::rc::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & btAddress,
uint8_t channel,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 53 of file SocketClient.h.

55 {
56 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
57
58 connect(SocketAddress(btAddress, channel), onStatus);
59 }
void connect(const std::string &btAddress, uint8_t channel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const

◆ connect() [2/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT , typename SocketContextFactoryT , typename... Args>
void net::rc::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & btAddress,
uint8_t channel,
const std::string & bindBtAddress,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 61 of file SocketClient.h.

64 {
65 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
66 Super::getConfig().Local::setBtAddress(bindBtAddress);
67
68 connect(onStatus);
69 }

◆ connect() [3/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT , typename SocketContextFactoryT , typename... Args>
void net::rc::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & btAddress,
uint8_t channel,
const std::string & bindBtAddress,
uint8_t bindChannel,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 81 of file SocketClient.h.

85 {
86 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
87 Super::getConfig().Local::setBtAddress(bindBtAddress).setChannel(bindChannel);
88
89 connect(onStatus);
90 }

◆ connect() [4/4]

template<template< typename PhysicalSocketClient, typename ConfigSocketClientT > typename SocketConnectorT, typename ConfigSocketClientT , typename SocketContextFactoryT , typename... Args>
void net::rc::stream::SocketClient< SocketConnectorT, ConfigSocketClientT, SocketContextFactoryT, Args >::connect ( const std::string & btAddress,
uint8_t channel,
uint8_t bindChannel,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 71 of file SocketClient.h.

74 {
75 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
76 Super::getConfig().Local::setChannel(bindChannel);
77
78 connect(onStatus);
79 }

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