21#ifndef G_REQUEST_CLIENT_H
22#define G_REQUEST_CLIENT_H
49 G_EXCEPTION( ProtocolError ,
"protocol error" ) ;
52 const GNet::Location & host_and_service ,
unsigned int connect_timeout ,
53 unsigned int response_timeout ) ;
58 void request(
const std::string & ) ;
81 bool onReceive(
const char * , std::size_t , std::size_t , std::size_t ,
char )
override ;
82 void onSendComplete()
override ;
83 void onDelete(
const std::string & )
override ;
84 void onSecure(
const std::string & ,
const std::string & ,
const std::string & )
override ;
85 void onConnect()
override ;
96 std::string requestLine(
const std::string & )
const ;
97 std::string result( std::string )
const ;
98 static GNet::Client::Config netConfig(
unsigned int connection_timeout ,
unsigned int response_timeout ) ;
104 std::string m_request ;
A class for making an outgoing connection to a remote server, with support for socket-level protocols...
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
A class that represents the remote target for out-going client connections.
A timer class template in which the timeout is delivered to the specified method.
A network client class that interacts with a remote server using a stateless line-based request/respo...
bool busy() const
Returns true after request() and before the subsequent event signal.
RequestClient(GNet::ExceptionSink, const std::string &key, const std::string &ok, const GNet::Location &host_and_service, unsigned int connect_timeout, unsigned int response_timeout)
Constructor.
void request(const std::string &)
Issues a request.
SMTP and message-store classes.
A structure containing GNet::Client configuration parameters.