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... >
 SocketServer (const std::string &name, const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, Args &&... args)
 
 SocketServer (const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, Args &&... args)
 
 SocketServer (const std::string &name, Args &&... args)
 
 SocketServer (Args &&... args)
 
void listen (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
 
void listen (const SocketAddress &localAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
 
void listen (const SocketAddress &localAddress, int backlog, 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 ()
 
- Public Member Functions inherited from core::socket::Socket< SocketAcceptorT::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::SocketServer< SocketAcceptorT< net::in::phy::stream::PhysicalSocketServer, ConfigSocketServerT >, SocketContextFactoryT, Args... >
using SocketConnection
 
using SocketAddress
 
- Public Types inherited from core::socket::Socket< SocketAcceptorT::Config >
using Config
 
- 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 40 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 45 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 66 of file SocketServer.h.

68 {
69 Super::getConfig().Local::setHost(ipOrHostname).setPort(port);
70
71 listen(onStatus);
72 }
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::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 74 of file SocketServer.h.

77 {
78 Super::getConfig().Local::setHost(ipOrHostname).setPort(port);
79 Super::getConfig().setBacklog(backlog);
80
81 listen(onStatus);
82 }

◆ 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 53 of file SocketServer.h.

53 {
54 Super::getConfig().Local::setPort(port);
55
56 listen(onStatus);
57 }

◆ 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 59 of file SocketServer.h.

59 {
60 Super::getConfig().Local::setPort(port);
61 Super::getConfig().setBacklog(backlog);
62
63 listen(onStatus);
64 }

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