SNode.C
Loading...
Searching...
No Matches
web::http::SocketContextUpgradeFactory< RequestT, ResponseT > Class Template Referenceabstract

#include <SocketContextUpgradeFactory.h>

Inheritance diagram for web::http::SocketContextUpgradeFactory< RequestT, ResponseT >:
Collaboration diagram for web::http::SocketContextUpgradeFactory< RequestT, ResponseT >:

Public Types

using Request = RequestT
using Response = ResponseT

Public Member Functions

virtual std::string name ()=0
Public Member Functions inherited from core::socket::stream::SocketContextFactory
 SocketContextFactory (SocketContextFactory &)=delete
 SocketContextFactory (SocketContextFactory &&)=delete
SocketContextFactoryoperator= (SocketContextFactory &)=delete
SocketContextFactoryoperator= (SocketContextFactory &&)=delete

Protected Member Functions

 SocketContextUpgradeFactory ()=default
 ~SocketContextUpgradeFactory () override=default
void prepare (Request &request, Response &response)
Protected Member Functions inherited from core::socket::stream::SocketContextFactory
 SocketContextFactory ()=default
virtual ~SocketContextFactory ()

Protected Attributes

std::size_t refCount = 0

Private Member Functions

virtual SocketContextUpgrade< Request, Response > * create (core::socket::stream::SocketConnection *socketConnection, Request *request, Response *response)=0
core::socket::stream::SocketContextcreate (core::socket::stream::SocketConnection *socketConnection) final
void incRefCount ()
void decRefCount ()
virtual void checkRefCount ()=0

Private Attributes

Requestrequest = nullptr
Responseresponse = nullptr
friend Response
friend Request

Friends

class SocketContextUpgrade< Request, Response >

Detailed Description

template<typename RequestT, typename ResponseT>
class web::http::SocketContextUpgradeFactory< RequestT, ResponseT >

Definition at line 68 of file SocketContextUpgradeFactory.h.

Member Typedef Documentation

◆ Request

template<typename RequestT, typename ResponseT>
using web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::Request = RequestT

Definition at line 70 of file SocketContextUpgradeFactory.h.

◆ Response

template<typename RequestT, typename ResponseT>
using web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::Response = ResponseT

Definition at line 71 of file SocketContextUpgradeFactory.h.

Constructor & Destructor Documentation

◆ SocketContextUpgradeFactory()

template<typename RequestT, typename ResponseT>
web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::SocketContextUpgradeFactory ( )
protecteddefault

◆ ~SocketContextUpgradeFactory()

template<typename RequestT, typename ResponseT>
web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::~SocketContextUpgradeFactory ( )
overrideprotecteddefault

Member Function Documentation

◆ checkRefCount()

template<typename RequestT, typename ResponseT>
virtual void web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::checkRefCount ( )
privatepure virtual

Implemented in web::http::client::SocketContextUpgradeFactory, and web::http::server::SocketContextUpgradeFactory.

Referenced by decRefCount().

Here is the caller graph for this function:

◆ create() [1/2]

Implements core::socket::stream::SocketContextFactory.

Definition at line 58 of file SocketContextUpgradeFactory.hpp.

58 {
60 }
virtual SocketContextUpgrade< Request, Response > * create(core::socket::stream::SocketConnection *socketConnection, Request *request, Response *response)=0

References request, and response.

Referenced by web::http::client::Request::upgrade(), and web::http::server::Response::upgrade().

Here is the caller graph for this function:

◆ create() [2/2]

template<typename RequestT, typename ResponseT>
virtual SocketContextUpgrade< Request, Response > * web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::create ( core::socket::stream::SocketConnection * socketConnection,
Request * request,
Response * response )
privatepure virtual

◆ decRefCount()

template<typename Request, typename Response>
void web::http::SocketContextUpgradeFactory< Request, Response >::decRefCount ( )
private

Definition at line 68 of file SocketContextUpgradeFactory.hpp.

References checkRefCount(), and refCount.

Here is the call graph for this function:

◆ incRefCount()

template<typename Request, typename Response>
void web::http::SocketContextUpgradeFactory< Request, Response >::incRefCount ( )
private

Definition at line 63 of file SocketContextUpgradeFactory.hpp.

63 {
64 ++refCount;
65 }

References refCount.

◆ name()

template<typename RequestT, typename ResponseT>
virtual std::string web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::name ( )
pure virtual

Implemented in web::websocket::client::SocketContextUpgradeFactory, and web::websocket::server::SocketContextUpgradeFactory.

Referenced by web::http::client::MasterRequest::executeUpgrade(), web::http::client::Request::upgrade(), and web::http::server::Response::upgrade().

Here is the caller graph for this function:

◆ prepare()

template<typename Request, typename Response>
void web::http::SocketContextUpgradeFactory< Request, Response >::prepare ( Request & request,
Response & response )
protected

Definition at line 51 of file SocketContextUpgradeFactory.hpp.

51 {
52 this->request = &request;
53 this->response = &response;
54 }

References request, and response.

Referenced by web::http::client::SocketContextUpgradeFactorySelector::select(), and web::http::server::SocketContextUpgradeFactorySelector::select().

Here is the caller graph for this function:

◆ SocketContextUpgrade< Request, Response >

template<typename RequestT, typename ResponseT>
friend class SocketContextUpgrade< Request, Response >
friend

Definition at line 99 of file SocketContextUpgradeFactory.h.

Member Data Documentation

◆ refCount

template<typename RequestT, typename ResponseT>
std::size_t web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::refCount = 0
protected

Definition at line 81 of file SocketContextUpgradeFactory.h.

Referenced by decRefCount(), and incRefCount().

◆ Request

template<typename RequestT, typename ResponseT>
friend web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::Request
private

Definition at line 99 of file SocketContextUpgradeFactory.h.

◆ request

template<typename RequestT, typename ResponseT>
Request* web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::request = nullptr
private

Definition at line 95 of file SocketContextUpgradeFactory.h.

Referenced by create(), and prepare().

◆ Response

template<typename RequestT, typename ResponseT>
friend web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::Response
private

Definition at line 98 of file SocketContextUpgradeFactory.h.

◆ response

template<typename RequestT, typename ResponseT>
Response* web::http::SocketContextUpgradeFactory< RequestT, ResponseT >::response = nullptr
private

Definition at line 96 of file SocketContextUpgradeFactory.h.

Referenced by create(), and prepare().


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