Responder Class Referenceabstract

#include <Pt/Http/Responder.h>

HTTP service responder.

Inherited by HttpResponder.

Public Member Functions

 Responder (Service &s)
 Construct with service.
 
virtual ~Responder ()
 Destructor.
 
Serviceservice ()
 Returns the service for which to respond.
 
const Serviceservice () const
 Returns the service for which to respond.
 
void beginRequest (Request &request, Reply &reply, System::EventLoop &loop)
 Called when the request header was received.
 
void readRequest (Request &request, Reply &reply, System::EventLoop &loop)
 Called when request body data was received.
 
void beginReply (const Request &request, Reply &reply, System::EventLoop &loop)
 Called when request is complete.
 
void writeReply (const Request &request, Reply &reply, System::EventLoop &loop)
 Write responding reply.
 

Protected Member Functions

virtual void onBeginRequest (Request &request, Reply &reply, System::EventLoop &loop)=0
 Called when the request header was received.
 
virtual void onBeginReply (const Request &request, Reply &reply, System::EventLoop &loop)=0
 Called when request is complete.
 
virtual void onWriteReply (const Request &request, Reply &reply, System::EventLoop &loop)=0
 Write responding reply.