21 #ifndef G_REQUEST_CLIENT_H
22 #define G_REQUEST_CLIENT_H
47 G_EXCEPTION( ProtocolError ,
"protocol error" ) ;
49 RequestClient(
const std::string & key ,
const std::string & ok ,
50 const GNet::Location & host_and_service ,
unsigned int connect_timeout ,
51 unsigned int response_timeout ) ;
56 void request(
const std::string & ) ;
85 virtual bool onReceive(
const char * ,
size_t ,
size_t )
override ;
91 virtual void onDelete(
const std::string & )
override ;
94 virtual void onDeleteImp(
const std::string & )
override ;
97 virtual void onSecure(
const std::string & )
override ;
104 std::string requestLine(
const std::string & )
const ;
105 std::string result( std::string )
const ;
112 std::string m_request ;
SMTP and message-store classes.
virtual void onConnect() override
Override from GNet::SimpleClient.
virtual ~RequestClient()
Destructor.
virtual void onDeleteImp(const std::string &) override
Override from GNet::Client.
virtual bool onReceive(const char *, size_t, size_t) override
Override from GNet::Client.
A class that holds a host/service name pair and the preferred address family (if any), and also the results of a name-to-address lookup, ie.
A configuration structure for GNet::LineBuffer.
virtual void onSecure(const std::string &) override
Override from GNet::SocketProtocolSink.
virtual void onSendComplete() override
Override from GNet::BufferedClient.
void request(const std::string &)
Issues a request.
bool busy() const
Returns true after request() and before the subsequent event signal.
virtual void onDelete(const std::string &) override
Override from GNet::HeapClient.
RequestClient(const std::string &key, const std::string &ok, const GNet::Location &host_and_service, unsigned int connect_timeout, unsigned int response_timeout)
Constructor.
A timer class template in which the timeout is delivered to the specified method. ...
A HeapClient class that adds slot/signal signalling, connection/response timeouts, and input line buffering.
A network client class that interacts with a remote server using a stateless line-based request/respo...