29#ifndef Pt_Http_Responder_h
30#define Pt_Http_Responder_h
32#include <Pt/Http/Api.h>
130 void setAcceptor(Acceptor& a)
HTTP reply message.
Definition Reply.h:64
HTTP request message.
Definition Request.h:65
void writeReply(const Request &request, Reply &reply, System::EventLoop &loop)
Write responding reply.
virtual void onWriteReply(const Request &request, Reply &reply, System::EventLoop &loop)=0
Write responding reply.
virtual ~Responder()
Destructor.
Service & service()
Returns the service for which to respond.
Definition Responder.h:121
void setFinished(bool isFinished)
Sets whether the exchange is finished.
Responder(Service &s)
Construct with service.
virtual void onReadRequest(Request &request, Reply &reply, System::EventLoop &loop)=0
Called for each chunk of the request body.
void beginReply(const Request &request, Reply &reply, System::EventLoop &loop)
Called when request is complete.
void setReady(bool isFinished)
Sets whether the current step is complete.
void beginRequest(Request &request, Reply &reply, System::EventLoop &loop)
Called when the request header was received.
virtual void onBeginReply(const Request &request, Reply &reply, System::EventLoop &loop)=0
Called when request is complete.
const Service & service() const
Returns the service for which to respond.
Definition Responder.h:126
virtual void onBeginRequest(Request &request, Reply &reply, System::EventLoop &loop)=0
Called when the request header was received.
void readRequest(Request &request, Reply &reply, System::EventLoop &loop)
Called when request body data was received.
Factory for request responders.
Definition Service.h:77
Event loop of a thread or process.
Definition EventLoop.h:83
HTTP clients and servers.
System programming
Definition Connection.h:26
Core module.
Definition Allocator.h:33