SNode.C
Loading...
Searching...
No Matches
web::http::server::Server< SocketServerT, RequestT, ResponseT > Class Template Reference

#include <Server.h>

Inheritance diagram for web::http::server::Server< SocketServerT, RequestT, ResponseT >:
Collaboration diagram for web::http::server::Server< SocketServerT, RequestT, ResponseT >:

Public Types

using Request = RequestT
 
using Response = ResponseT
 
using SocketConnection = typename Super::SocketConnection
 
using SocketAddress = typename SocketConnection::SocketAddress
 

Public Member Functions

 Server (const std::string &name, const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> &&onRequestReady)
 
 Server (const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> &&onRequestReady)
 
 Server (const std::string &name, std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> &&onRequestReady)
 
 Server (const std::function< void(const std::shared_ptr< Request > &, std::shared_ptr< Response > &)> &&onRequestReady)
 

Private Types

using Super
 

Detailed Description

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT, typename ResponseT>
class web::http::server::Server< SocketServerT, RequestT, ResponseT >

Definition at line 35 of file Server.h.

Member Typedef Documentation

◆ Request

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
using web::http::server::Server< SocketServerT, RequestT, ResponseT >::Request = RequestT

Definition at line 41 of file Server.h.

◆ Response

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
using web::http::server::Server< SocketServerT, RequestT, ResponseT >::Response = ResponseT

Definition at line 42 of file Server.h.

◆ SocketAddress

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
using web::http::server::Server< SocketServerT, RequestT, ResponseT >::SocketAddress = typename SocketConnection::SocketAddress

Definition at line 50 of file Server.h.

◆ SocketConnection

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
using web::http::server::Server< SocketServerT, RequestT, ResponseT >::SocketConnection = typename Super::SocketConnection

Definition at line 49 of file Server.h.

◆ Super

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
using web::http::server::Server< SocketServerT, RequestT, ResponseT >::Super
private
Initial value:
SocketServerT<web::http::server::SocketContextFactory<Request, Response>,
std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>>

Definition at line 45 of file Server.h.

Constructor & Destructor Documentation

◆ Server() [1/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server ( const std::string & name,
const std::function< void(SocketConnection *)> & onConnect,
const std::function< void(SocketConnection *)> & onConnected,
const std::function< void(SocketConnection *)> & onDisconnect,
std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> && onRequestReady )
inline

Definition at line 52 of file Server.h.

57 : Super(name, onConnect, onConnected, onDisconnect, std::forward<decltype(onRequestReady)>(onRequestReady)) {
58 }
SocketServerT< web::http::server::SocketContextFactory< Request, Response >, std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> > Super
Definition Server.h:45

References web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Referenced by web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Server() [2/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server ( const std::function< void(SocketConnection *)> & onConnect,
const std::function< void(SocketConnection *)> & onConnected,
const std::function< void(SocketConnection *)> & onDisconnect,
std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> && onRequestReady )
inline

Definition at line 60 of file Server.h.

64 : Server("", onConnect, onConnected, onDisconnect, std::forward<decltype(onRequestReady)>(onRequestReady)) {
65 }
Server(const std::string &name, const std::function< void(SocketConnection *)> &onConnect, const std::function< void(SocketConnection *)> &onConnected, const std::function< void(SocketConnection *)> &onDisconnect, std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> &&onRequestReady)
Definition Server.h:52

References web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Referenced by web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Server() [3/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server ( const std::string & name,
std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> && onRequestReady )
inline

Definition at line 67 of file Server.h.

69 : Super(name, std::forward<decltype(onRequestReady)>(onRequestReady)) {
70 }

References web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Referenced by web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Server() [4/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketServerT, typename RequestT , typename ResponseT >
web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server ( const std::function< void(const std::shared_ptr< Request > &, std::shared_ptr< Response > &)> && onRequestReady)
inlineexplicit

Definition at line 72 of file Server.h.

73 : Server("", std::forward<decltype(onRequestReady)>(onRequestReady)) {
74 }

References web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Referenced by web::http::server::Server< SocketServerT, RequestT, ResponseT >::Server().

Here is the call graph for this function:
Here is the caller graph for this function:

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