SNode.C
Loading...
Searching...
No Matches
web::http::client::Client< SocketClientT > Class Template Reference

#include <Client.h>

Inheritance diagram for web::http::client::Client< SocketClientT >:
Collaboration diagram for web::http::client::Client< SocketClientT >:

Public Types

using Request = web::http::client::Request
 
using Response = web::http::client::Response
 
using SocketConnection = typename Super::SocketConnection
 
using SocketAddress = typename Super::SocketAddress
 

Public Member Functions

 Client (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 > &)> &&onRequestBegin, std::function< void(const std::shared_ptr< Request > &)> &&onRequestEnd)
 
 Client (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 > &)> &&onRequestBegin, std::function< void(const std::shared_ptr< Request > &)> &&onRequestEnd)
 
 Client (const std::string &name, std::function< void(const std::shared_ptr< Request > &)> &&onRequestBegin, std::function< void(const std::shared_ptr< Request > &)> &&onRequestEnd)
 
 Client (std::function< void(const std::shared_ptr< Request > &)> &&onRequestBegin, std::function< void(const std::shared_ptr< Request > &)> &&onRequestEnd)
 
void setPipelinedRequests (bool pipelinedRequests)
 

Private Types

using Super = SocketClientT< web::http::client::SocketContextFactory, std::function< void(const std::shared_ptr< web::http::client::Request > &)>, std::function< void(const std::shared_ptr< web::http::client::Request > &)>, std::function< net::config::ConfigInstance &()> >
 

Detailed Description

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
class web::http::client::Client< SocketClientT >

Definition at line 57 of file Client.h.

Member Typedef Documentation

◆ Request

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
using web::http::client::Client< SocketClientT >::Request = web::http::client::Request

Definition at line 63 of file Client.h.

◆ Response

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
using web::http::client::Client< SocketClientT >::Response = web::http::client::Response

Definition at line 64 of file Client.h.

◆ SocketAddress

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
using web::http::client::Client< SocketClientT >::SocketAddress = typename Super::SocketAddress

Definition at line 74 of file Client.h.

◆ SocketConnection

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
using web::http::client::Client< SocketClientT >::SocketConnection = typename Super::SocketConnection

Definition at line 73 of file Client.h.

◆ Super

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
using web::http::client::Client< SocketClientT >::Super = SocketClientT<web::http::client::SocketContextFactory, std::function<void(const std::shared_ptr<web::http::client::Request>&)>, std::function<void(const std::shared_ptr<web::http::client::Request>&)>, std::function<net::config::ConfigInstance&()> >
private

Definition at line 67 of file Client.h.

Constructor & Destructor Documentation

◆ Client() [1/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
web::http::client::Client< SocketClientT >::Client ( 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 > &)> &&  onRequestBegin,
std::function< void(const std::shared_ptr< Request > &)> &&  onRequestEnd 
)
inline

Definition at line 76 of file Client.h.

82 : Super(name,
83 onConnect,
84 onConnected,
85 onDisconnect,
86 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestBegin),
87 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestEnd),
88 [this]() -> net::config::ConfigInstance& {
89 return Super::getConfig();
90 }) {
91 }
SocketClientT< web::http::client::SocketContextFactory, std::function< void(const std::shared_ptr< web::http::client::Request > &)>, std::function< void(const std::shared_ptr< web::http::client::Request > &)>, std::function< net::config::ConfigInstance &()> > Super
Definition Client.h:70

◆ Client() [2/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
web::http::client::Client< SocketClientT >::Client ( 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 > &)> &&  onRequestBegin,
std::function< void(const std::shared_ptr< Request > &)> &&  onRequestEnd 
)
inline

Definition at line 93 of file Client.h.

98 : Client("",
99 onConnect,
100 onConnected,
101 onDisconnect,
102 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestBegin),
103 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestEnd)) {
104 }
Client(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 > &)> &&onRequestBegin, std::function< void(const std::shared_ptr< Request > &)> &&onRequestEnd)
Definition Client.h:76

Referenced by main().

Here is the caller graph for this function:

◆ Client() [3/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
web::http::client::Client< SocketClientT >::Client ( const std::string &  name,
std::function< void(const std::shared_ptr< Request > &)> &&  onRequestBegin,
std::function< void(const std::shared_ptr< Request > &)> &&  onRequestEnd 
)
inline

Definition at line 106 of file Client.h.

109 : Super(name,
110 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestBegin),
111 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestEnd),
112 [this]() -> net::config::ConfigInstance& {
113 return Super::getConfig();
114 }) {
115 }

Referenced by main().

Here is the caller graph for this function:

◆ Client() [4/4]

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
web::http::client::Client< SocketClientT >::Client ( std::function< void(const std::shared_ptr< Request > &)> &&  onRequestBegin,
std::function< void(const std::shared_ptr< Request > &)> &&  onRequestEnd 
)
inline

Definition at line 117 of file Client.h.

119 : Client("",
120 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestBegin),
121 std::forward<std::function<void(const std::shared_ptr<Request>&)>>(onRequestEnd)) {
122 }

Member Function Documentation

◆ setPipelinedRequests()

template<template< typename SocketContextFactoryT, typename... Args > typename SocketClientT>
void web::http::client::Client< SocketClientT >::setPipelinedRequests ( bool  pipelinedRequests)
inline

Definition at line 124 of file Client.h.

124 {
125 Super::getSocketContextFactory()->setPipelinedRequests(pipelinedRequests);
126 }

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