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

#include <SocketServer.h>

Inheritance diagram for net::in6::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >:
Collaboration diagram for net::in6::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::in6::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::in6::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::in6::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::in6::stream::SocketServer< SocketAcceptorT, ConfigSocketServerT, SocketContextFactoryT, Args >::Super
private
Initial value:
core::socket::stream::
SocketServer<SocketAcceptorT<net::in6::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::in6::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 87 of file SocketServer.h.

89 {
90 Super::getConfig().Local::setHost(ipOrHostname).setPort(port);
91
93 }
void listen(uint16_t port, 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>
void net::in6::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 95 of file SocketServer.h.

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

◆ listen() [3/4]

template<template< typename PhysicalSocketServer, typename ConfigSocketServer > typename SocketAcceptorT, typename ConfigSocketServerT, typename SocketContextFactoryT, typename... Args>
void net::in6::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::in6::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 80 of file SocketServer.h.

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

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