WebSocketResponder Class Reference

#include <Pt/Http/WebSocketResponder.h>

Responder for the WebSocket handshake.

Inherits Responder.

Public Member Functions

 WebSocketResponder (Pt::Http::WebSocketService &s)
 Constructs the responder for s.
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 (Pt::Http::Request &request, Pt::Http::Reply &reply, Pt::System::EventLoop &loop)
 Called when the request header was received.
virtual void onReadRequest (Pt::Http::Request &request, Pt::Http::Reply &reply, Pt::System::EventLoop &loop)
 Called for each chunk of the request body.
virtual void onBeginReply (const Pt::Http::Request &request, Pt::Http::Reply &reply, Pt::System::EventLoop &loop)
 Called when request is complete.
virtual void onWriteReply (const Pt::Http::Request &request, Pt::Http::Reply &reply, Pt::System::EventLoop &loop)
 Write responding reply.
void setReady (bool isFinished)
 Sets whether the current step is complete.
void setFinished (bool isFinished)
 Sets whether the exchange is finished.