SNode.C
|
#include <SocketServer.h>
Public Types | |
using | SocketConnection = typename SocketAcceptor::SocketConnection |
using | SocketAddress = typename SocketAcceptor::SocketAddress |
![]() | |
using | Config |
Public Member Functions | |
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< SocketContextFactory > | getSocketContextFactory () |
![]() | |
Socket (const std::string &name) | |
Socket (const Socket &)=default | |
Socket (Socket &&) noexcept=delete | |
Socket & | operator= (const Socket &)=default |
Socket & | operator= (Socket &&) noexcept=delete |
virtual | ~Socket () |
Config & | getConfig () const |
Private Types | |
using | SocketAcceptor = SocketAcceptorT |
using | SocketContextFactory = SocketContextFactoryT |
using | Super = core::socket::Socket<typename SocketAcceptor::Config> |
Private Member Functions | |
void | realListen (const std::function< void(const SocketAddress &, core::socket::State)> &onStatus, unsigned int tries, double retryTimeoutScale) const |
Private Attributes | |
std::shared_ptr< SocketContextFactory > | socketContextFactory |
std::function< void(SocketConnection *)> | onConnect |
std::function< void(SocketConnection *)> | onConnected |
std::function< void(SocketConnection *)> | onDisconnect |
std::size_t | totalOk = 0 |
std::size_t | currentOk = 0 |
std::size_t | currentError = 0 |
std::size_t | currentFatal = 0 |
Additional Inherited Members | |
![]() | |
std::shared_ptr< Config > | config |
Definition at line 65 of file SocketServer.h.
|
private |
Definition at line 67 of file SocketServer.h.
using core::socket::stream::SocketServer< SocketAcceptorT, SocketContextFactoryT, Args >::SocketAddress = typename SocketAcceptor::SocketAddress |
Definition at line 74 of file SocketServer.h.
using core::socket::stream::SocketServer< SocketAcceptorT, SocketContextFactoryT, Args >::SocketConnection = typename SocketAcceptor::SocketConnection |
Definition at line 73 of file SocketServer.h.
|
private |
Definition at line 68 of file SocketServer.h.
|
private |
Definition at line 70 of file SocketServer.h.
|
inline |
Definition at line 76 of file SocketServer.h.
|
inline |
Definition at line 88 of file SocketServer.h.
|
inline |
Definition at line 96 of file SocketServer.h.
|
inlineexplicit |
Definition at line 120 of file SocketServer.h.
|
inline |
Definition at line 236 of file SocketServer.h.
|
inline |
Definition at line 197 of file SocketServer.h.
|
inline |
Definition at line 204 of file SocketServer.h.
|
inline |
Definition at line 193 of file SocketServer.h.
|
inlineprivate |
Definition at line 125 of file SocketServer.h.
|
inline |
Definition at line 212 of file SocketServer.h.
|
inline |
Definition at line 220 of file SocketServer.h.
|
inline |
Definition at line 228 of file SocketServer.h.
|
private |
Definition at line 249 of file SocketServer.h.
|
private |
Definition at line 250 of file SocketServer.h.
|
private |
Definition at line 248 of file SocketServer.h.
|
private |
Definition at line 243 of file SocketServer.h.
|
private |
Definition at line 244 of file SocketServer.h.
|
private |
Definition at line 245 of file SocketServer.h.
|
private |
Definition at line 241 of file SocketServer.h.
|
private |
Definition at line 247 of file SocketServer.h.