27 unsigned int connection_timeout ,
unsigned int response_timeout ) :
28 m_resolver_info(server) ,
29 m_connection_timeout(connection_timeout) ,
30 m_response_timeout(response_timeout) ,
33 m_client.eventSignal().connect(
G::slot(*
this,&GSmtp::NetworkProcessor::clientEvent) ) ;
38 m_client.eventSignal().disconnect() ;
43 if( !m_lazy || m_client.get() == NULL )
45 m_client.reset(
new RequestClient(
"scanner",
"ok",
"\n",m_resolver_info,m_connection_timeout,m_response_timeout));
48 m_client->request( path ) ;
51 void GSmtp::NetworkProcessor::clientEvent( std::string s1 , std::string s2 )
53 G_DEBUG(
"GSmtp::NetworkProcessor::clientEvent: [" << s1 <<
"] [" << s2 <<
"]" ) ;
57 m_done_signal.emit( s2.empty() ) ;
78 return m_done_signal ;
84 if( m_client.get() != NULL && m_client->busy() )
virtual std::string text() const
Final override from GNet::Processor.
Slot0 slot(T &object, void(T::*fn)())
Part of the slot/signal system.
virtual void abort()
Final override from GNet::Processor.
virtual bool cancelled() const
Final override from GNet::Processor.
NetworkProcessor(const std::string &, unsigned int connection_timeout, unsigned int response_timeout)
Constructor.
virtual bool repoll() const
Final override from GNet::Processor.
virtual void start(const std::string &path)
Final override from GNet::Processor.
A client class that interacts with a remote process with a stateless line-based request/response prot...
virtual ~NetworkProcessor()
Destructor.
virtual G::Signal1< bool > & doneSignal()
Final override from GNet::Processor.