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.
 
void beginReply (const Request &request, Reply &reply, System::EventLoop &loop)
 Called when request is complete.
 
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.
 
Serviceservice ()
 Returns the service for which to respond.
 
const Serviceservice () const
 Returns the service for which to respond.
 
void writeReply (const Request &request, Reply &reply, System::EventLoop &loop)
 Write responding reply.
 

Protected Member Functions

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