SNode.C
Loading...
Searching...
No Matches
web::http::client::SocketContextFactory Class Reference

#include <SocketContextFactory.h>

Inheritance diagram for web::http::client::SocketContextFactory:
Collaboration diagram for web::http::client::SocketContextFactory:

Public Types

using MasterRequest = web::http::client::MasterRequest
using Response = web::http::client::Response

Public Member Functions

 SocketContextFactory (const std::function< void(const std::shared_ptr< MasterRequest > &)> &onHttpConnected, const std::function< void(const std::shared_ptr< MasterRequest > &)> &onHttpDisconnected, const std::function< net::config::ConfigInstance &()> &getConfigInstance)
Public Member Functions inherited from core::socket::stream::SocketContextFactory
 SocketContextFactory (SocketContextFactory &)=delete
 SocketContextFactory (SocketContextFactory &&)=delete
SocketContextFactoryoperator= (SocketContextFactory &)=delete
SocketContextFactoryoperator= (SocketContextFactory &&)=delete

Private Member Functions

core::socket::stream::SocketContextcreate (core::socket::stream::SocketConnection *socketConnection) override

Private Attributes

std::function< void(const std::shared_ptr< MasterRequest > &)> onHttpConnected
std::function< void(const std::shared_ptr< MasterRequest > &)> onHttpDisconnected
net::config::ConfigInstanceconfigInstance

Additional Inherited Members

Protected Member Functions inherited from core::socket::stream::SocketContextFactory
 SocketContextFactory ()=default
virtual ~SocketContextFactory ()

Detailed Description

Definition at line 60 of file SocketContextFactory.h.

Member Typedef Documentation

◆ MasterRequest

◆ Response

Constructor & Destructor Documentation

◆ SocketContextFactory()

web::http::client::SocketContextFactory::SocketContextFactory ( const std::function< void(const std::shared_ptr< MasterRequest > &)> & onHttpConnected,
const std::function< void(const std::shared_ptr< MasterRequest > &)> & onHttpDisconnected,
const std::function< net::config::ConfigInstance &()> & getConfigInstance )

Definition at line 55 of file SocketContextFactory.cpp.

60 , configInstance(getConfigInstance()) {
61 }
std::function< void(const std::shared_ptr< MasterRequest > &)> onHttpConnected
std::function< void(const std::shared_ptr< MasterRequest > &)> onHttpDisconnected
net::config::ConfigInstance & configInstance

References configInstance, onHttpConnected, and onHttpDisconnected.

Member Function Documentation

◆ create()

core::socket::stream::SocketContext * web::http::client::SocketContextFactory::create ( core::socket::stream::SocketConnection * socketConnection)
overrideprivatevirtual

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

Definition at line 63 of file SocketContextFactory.cpp.

63 {
64 return new web::http::client::SocketContext(socketConnection,
67 configInstance.getSubCommand<ConfigHTTP>()->getHostHeader(),
68 configInstance.getSubCommand<ConfigHTTP>()->getPipelinedRequests());
69 }

References configInstance, web::http::client::ConfigHTTP::getHostHeader(), web::http::client::ConfigHTTP::getPipelinedRequests(), utils::SubCommand::getSubCommand(), onHttpConnected, onHttpDisconnected, and web::http::client::SocketContext::SocketContext().

Here is the call graph for this function:

Member Data Documentation

◆ configInstance

net::config::ConfigInstance& web::http::client::SocketContextFactory::configInstance
private

Definition at line 75 of file SocketContextFactory.h.

Referenced by create(), and SocketContextFactory().

◆ onHttpConnected

std::function<void(const std::shared_ptr<MasterRequest>&)> web::http::client::SocketContextFactory::onHttpConnected
private

Definition at line 72 of file SocketContextFactory.h.

Referenced by create(), and SocketContextFactory().

◆ onHttpDisconnected

std::function<void(const std::shared_ptr<MasterRequest>&)> web::http::client::SocketContextFactory::onHttpDisconnected
private

Definition at line 73 of file SocketContextFactory.h.

Referenced by create(), and SocketContextFactory().


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