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

#include <SocketContextUpgrade.h>

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

Protected Types

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

Protected Member Functions

 SocketContextUpgrade (core::socket::stream::SocketConnection *socketConnection, SocketContextUpgradeFactory *socketContextUpgradeFactory)
 ~SocketContextUpgrade () override
Protected Member Functions inherited from core::socket::stream::SocketContext
void onWriteError (int errnum) override
void onReadError (int errnum) override
std::size_t readFromPeer ()
Protected Member Functions inherited from core::socket::SocketContext
 SocketContext ()=default
virtual ~SocketContext ()
virtual std::size_t onReceivedFromPeer ()=0
virtual bool onSignal (int sig)=0

Private Attributes

SocketContextUpgradeFactorysocketContextUpgradeFactory = nullptr

Additional Inherited Members

Public Member Functions inherited from core::socket::stream::SocketContext
 SocketContext (core::socket::stream::SocketConnection *socketConnection)
void sendToPeer (const char *chunk, std::size_t chunkLen) const final
bool streamToPeer (core::pipe::Source *source) const
void streamEof ()
std::size_t readFromPeer (char *chunk, std::size_t chunklen) const final
void setTimeout (const utils::Timeval &timeout) final
void shutdownRead ()
void shutdownWrite (bool forceClose=false)
void close () override
std::size_t getTotalSent () const override
std::size_t getTotalQueued () const override
std::size_t getTotalRead () const override
std::size_t getTotalProcessed () const override
std::string getOnlineSince () const override
std::string getOnlineDuration () const override
SocketConnectiongetSocketConnection () const
void sendToPeer (const std::string &data) const
Public Member Functions inherited from core::socket::SocketContext
 SocketContext (const SocketContext &)=delete
 SocketContext (SocketContext &&)=delete
SocketContextoperator= (const SocketContext &)=delete
SocketContextoperator= (SocketContext &&)=delete
void sendToPeer (const std::string &data) const

Detailed Description

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

Definition at line 59 of file SocketContextUpgrade.h.

Member Typedef Documentation

◆ Request

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

Definition at line 61 of file SocketContextUpgrade.h.

◆ Response

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

Definition at line 62 of file SocketContextUpgrade.h.

◆ SocketContextUpgradeFactory

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

Definition at line 64 of file SocketContextUpgrade.h.

Constructor & Destructor Documentation

◆ SocketContextUpgrade()

template<typename RequestT, typename ResponseT>
web::http::SocketContextUpgrade< RequestT, ResponseT >::SocketContextUpgrade ( core::socket::stream::SocketConnection * socketConnection,
SocketContextUpgradeFactory * socketContextUpgradeFactory )
inlineprotected

◆ ~SocketContextUpgrade()

template<typename RequestT, typename ResponseT>
web::http::SocketContextUpgrade< RequestT, ResponseT >::~SocketContextUpgrade ( )
inlineoverrideprotected

Definition at line 73 of file SocketContextUpgrade.h.

73 {
74 socketContextUpgradeFactory->decRefCount();
75 }

References socketContextUpgradeFactory.

Member Data Documentation

◆ socketContextUpgradeFactory

template<typename RequestT, typename ResponseT>
SocketContextUpgradeFactory* web::http::SocketContextUpgrade< RequestT, ResponseT >::socketContextUpgradeFactory = nullptr
private

Definition at line 78 of file SocketContextUpgrade.h.

Referenced by SocketContextUpgrade(), and ~SocketContextUpgrade().


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