ofxHTTP
A collection of tools for HTTP.
ofx::HTTP::ServerEventArgs Class Reference

An event describing a server request. More...

#include <ServerEvents.h>

Inheritance diagram for ofx::HTTP::ServerEventArgs:
ofx::HTTP::BasePostEventArgs ofx::HTTP::SSEEventArgs ofx::HTTP::WebSocketEventArgs ofx::HTTP::PostEventArgs ofx::HTTP::PostFormEventArgs ofx::HTTP::PostUploadEventArgs ofx::HTTP::SSECloseEventArgs ofx::HTTP::SSEFrameEventArgs ofx::HTTP::WebSocketCloseEventArgs ofx::HTTP::WebSocketErrorEventArgs ofx::HTTP::WebSocketFrameEventArgs

Public Member Functions

 ServerEventArgs (Poco::Net::HTTPServerRequest &request, Poco::Net::HTTPServerResponse &response, AbstractSession &session)
 Construct the ServerEventArgs. More...
 
virtual ~ServerEventArgs ()
 Destroy the ServerEventArgs.
 
Poco::Net::HTTPServerRequest & request ()
 Get the Poco::Net::HTTPServerRequest. More...
 
Poco::Net::HTTPServerResponse & response ()
 Get the Poco::Net::HTTPServerResponse. More...
 
AbstractSessionsession ()
 Get the session associated with this event. More...
 

Protected Attributes

Poco::Net::HTTPServerRequest & _request
 A reference to the server request.
 
Poco::Net::HTTPServerResponse & _response
 Callbacks are permitted to set the response. More...
 
AbstractSession_session
 The session associated with the event.
 

Detailed Description

An event describing a server request.

Constructor & Destructor Documentation

◆ ServerEventArgs()

ofx::HTTP::ServerEventArgs::ServerEventArgs ( Poco::Net::HTTPServerRequest &  request,
Poco::Net::HTTPServerResponse &  response,
AbstractSession session 
)
inline

Construct the ServerEventArgs.

Parameters
requestthe Poco::Net::HTTPServerRequest.
responsethe Poco::Net::HTTPServerResponse.
sessionThe AbstractSession associated with this event.

Member Function Documentation

◆ request()

Poco::Net::HTTPServerRequest& ofx::HTTP::ServerEventArgs::request ( )
inline

Get the Poco::Net::HTTPServerRequest.

Returns
the Poco::Net::HTTPServerRequest.

◆ response()

Poco::Net::HTTPServerResponse& ofx::HTTP::ServerEventArgs::response ( )
inline

Get the Poco::Net::HTTPServerResponse.

Returns
the Poco::Net::HTTPServerResponse.

◆ session()

AbstractSession& ofx::HTTP::ServerEventArgs::session ( )
inline

Get the session associated with this event.

Returns
the session associated with this event.

Member Data Documentation

◆ _response

Poco::Net::HTTPServerResponse& ofx::HTTP::ServerEventArgs::_response
protected

Callbacks are permitted to set the response.

Warning
Before working with the response, the callback must check the HTTPServerResponse::sent() method to ensure that the response stream is still available available.

The documentation for this class was generated from the following file: