SNode.C
Loading...
Searching...
No Matches
net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args > Class Template Reference

#include <SocketServer.h>

Inheritance diagram for net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >:
Collaboration diagram for net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >:

Public Member Functions

const Superlisten (uint16_t psm, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Superlisten (uint16_t psm, int backlog, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Superlisten (const std::string &btAddress, uint16_t psm, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Superlisten (const std::string &btAddress, uint16_t psm, int backlog, const std::function< void(const SocketAddress &SocketAddress, core::socket::State)> &onStatus) const
Public Member Functions inherited from core::socket::stream::SocketServer< SocketAcceptorT< net::l2::phy::stream::PhysicalSocketServer, ConfigSocketServerT >, SocketContextFactoryT, Args... >
const SocketServerlisten (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
std::function< void(SocketConnection *)> & getOnConnect () const
const SocketServersetOnConnect (const std::function< void(SocketConnection *)> &onConnect, bool initialize=false) const
std::function< void(SocketConnection *)> & getOnConnected () const
const SocketServersetOnConnected (const std::function< void(SocketConnection *)> &onConnected, bool initialize=false) const
std::function< void(SocketConnection *)> & getOnDisconnect () const
SocketServersetOnDisconnect (const std::function< void(SocketConnection *)> &onDisconnect, bool initialize=false)
std::shared_ptr< SocketContextFactorygetSocketContextFactory () const
Public Member Functions inherited from core::socket::Socket< SocketAcceptorT::Config >
 Socket (const std::string &name)
virtual ~Socket ()
ConfiggetConfig () const

Private Types

using Super

Additional Inherited Members

Public Types inherited from core::socket::stream::SocketServer< SocketAcceptorT< net::l2::phy::stream::PhysicalSocketServer, ConfigSocketServerT >, SocketContextFactoryT, Args... >
using SocketConnection
using SocketAddress
using Config
Public Types inherited from core::socket::Socket< SocketAcceptorT::Config >
using Config
Protected Member Functions inherited from core::socket::Socket< SocketAcceptorT::Config >
Socketoperator= (const Socket &)=default
Protected Attributes inherited from core::socket::Socket< SocketAcceptorT::Config >
std::shared_ptr< Configconfig

Detailed Description

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
class net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >

Definition at line 62 of file SocketServer.h.

Member Typedef Documentation

◆ Super

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
using net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::Super
private
Initial value:
core::socket::stream::
SocketServer<SocketAcceptorT<net::l2::phy::stream::PhysicalSocketServer, ConfigSocketServerT>, SocketContextFactoryT, Args...>

Definition at line 67 of file SocketServer.h.

Member Function Documentation

◆ listen() [1/4]

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
const Super & net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::listen ( const std::string & btAddress,
uint16_t psm,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 89 of file SocketServer.h.

91 {
92 Super::getConfig().Local::setBtAddress(btAddress).setPsm(psm);
93
94 return listen(onStatus);
95 }
const Super & listen(uint16_t psm, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const

◆ listen() [2/4]

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
const Super & net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::listen ( const std::string & btAddress,
uint16_t psm,
int backlog,
const std::function< void(const SocketAddress &SocketAddress, core::socket::State)> & onStatus ) const
inline

Definition at line 97 of file SocketServer.h.

100 {
101 Super::getConfig().Local::setBtAddress(btAddress).setPsm(psm);
102 Super::getConfig().setBacklog(backlog);
103
104 return listen(onStatus);
105 }

◆ listen() [3/4]

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
const Super & net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::listen ( uint16_t psm,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 75 of file SocketServer.h.

75 {
76 Super::getConfig().Local::setPsm(psm);
77
78 return listen(onStatus);
79 }

◆ listen() [4/4]

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
const Super & net::l2::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::listen ( uint16_t psm,
int backlog,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 82 of file SocketServer.h.

82 {
83 Super::getConfig().Local::setPsm(psm);
84 Super::getConfig().setBacklog(backlog);
85
86 return listen(onStatus);
87 }

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