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)
 
void setHostHeader (const std::string &hostHeader)
 
std::string getHostHeader () const
 
void setPipelinedRequests (bool pipelinedRequests)
 
- 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
 
ConfigHTTP configHttp
 

Additional Inherited Members

- Protected Member Functions inherited from web::http::SocketContextFactory< web::http::client::SocketContext >
 SocketContextFactory ()=default
 
 ~SocketContextFactory () override=default
 
- Protected Member Functions inherited from core::socket::stream::SocketContextFactory
 SocketContextFactory ()=default
 

Detailed Description

Definition at line 62 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 50 of file SocketContextFactory.cpp.

55 , configHttp(web::http::client::ConfigHTTP(getConfigInstance())) {
56 }
std::function< void(const std::shared_ptr< MasterRequest > &)> onHttpConnected
std::function< void(const std::shared_ptr< MasterRequest > &)> onHttpDisconnected

References web::http::client::ConfigHTTP::ConfigHTTP(), configHttp, onHttpConnected, and onHttpDisconnected.

Here is the call graph for this function:

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 70 of file SocketContextFactory.cpp.

References configHttp, web::http::client::ConfigHTTP::getHostHeader(), web::http::client::ConfigHTTP::getPipelinedRequests(), onHttpConnected, onHttpDisconnected, and web::http::client::SocketContext::SocketContext().

Here is the call graph for this function:

◆ getHostHeader()

std::string web::http::client::SocketContextFactory::getHostHeader ( ) const

Definition at line 62 of file SocketContextFactory.cpp.

62 {
64 }

References configHttp, and web::http::client::ConfigHTTP::getHostHeader().

Here is the call graph for this function:

◆ setHostHeader()

void web::http::client::SocketContextFactory::setHostHeader ( const std::string &  hostHeader)

Definition at line 58 of file SocketContextFactory.cpp.

58 {
59 configHttp.setHostHeader(hostHeader);
60 }
void setHostHeader(const std::string &hostHeader)

References configHttp, and web::http::client::ConfigHTTP::setHostHeader().

Here is the call graph for this function:

◆ setPipelinedRequests()

void web::http::client::SocketContextFactory::setPipelinedRequests ( bool  pipelinedRequests)

Definition at line 66 of file SocketContextFactory.cpp.

66 {
67 configHttp.setPipelinedRequests(pipelinedRequests);
68 }
void setPipelinedRequests(bool pipelinedRequests)

References configHttp, and web::http::client::ConfigHTTP::setPipelinedRequests().

Here is the call graph for this function:

Member Data Documentation

◆ configHttp

ConfigHTTP web::http::client::SocketContextFactory::configHttp
private

◆ onHttpConnected

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

Definition at line 79 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 80 of file SocketContextFactory.h.

Referenced by create(), and SocketContextFactory().


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