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

#include <SocketServer.h>

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

Public Member Functions

void listen (uint16_t port, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
void listen (uint16_t port, int backlog, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
void listen (const std::string &ipOrHostname, uint16_t port, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
void listen (const std::string &ipOrHostname, uint16_t port, int backlog, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
Public Member Functions inherited from core::socket::stream::SocketServer< SocketAcceptorT< net::in::phy::stream::PhysicalSocketServer, ConfigSocketServerT >, SocketContextFactoryT, Args... >
void listen (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< SocketContextFactorygetSocketContextFactory ()
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::in::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::in::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::in::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::Super
private
Initial value:
core::socket::stream::
SocketServer<SocketAcceptorT<net::in::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>
void net::in::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::listen ( const std::string & ipOrHostname,
uint16_t port,
const std::function< void(const SocketAddress &, core::socket::State)> & onStatus ) const
inline

Definition at line 88 of file SocketServer.h.

90 {
91 Super::getConfig().Local::setHost(ipOrHostname).setPort(port);
92
94 }
void listen(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:

◆ listen() [2/4]

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

Definition at line 96 of file SocketServer.h.

99 {
100 Super::getConfig().Local::setHost(ipOrHostname).setPort(port);
101 Super::getConfig().setBacklog(backlog);
102
104 }

◆ listen() [3/4]

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
void net::in::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::listen ( uint16_t port,
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::setPort(port);
77
79 }

Referenced by main().

Here is the caller graph for this function:

◆ listen() [4/4]

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

Definition at line 81 of file SocketServer.h.

81 {
82 Super::getConfig().Local::setPort(port);
83 Super::getConfig().setBacklog(backlog);
84
86 }

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