ofxHTTP
A collection of tools for HTTP.
|
Defines an abstract HTTP server route. More...
#include <AbstractServerTypes.h>
Public Member Functions | |
virtual | ~AbstractRoute () |
Destroy the AbstractRoute instance. | |
virtual std::string | routePathPattern () const =0 |
Get the route's regex path pattern. More... | |
virtual bool | canHandleRequest (const Poco::Net::HTTPServerRequest &request, bool isSecurePort) const =0 |
Determine if this route can handle the given request. More... | |
virtual void | stop ()=0 |
Stop any pending activity and close this route. More... | |
virtual AbstractServer * | getServer ()=0 |
Get a pointer to the server. More... | |
virtual void | setServer (AbstractServer *server)=0 |
Set the parent server. More... | |
Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandler | |
virtual | ~AbstractHTTPRequestHandler () |
Destroy the AbstractHTTPRequestHandler. | |
Public Member Functions inherited from ofx::HTTP::AbstractServerEventRequestHandler | |
virtual | ~AbstractServerEventRequestHandler () |
Destroy the AbstractServerEventRequestHandler. | |
virtual void | handleRequest (ServerEventArgs &evt)=0 |
Handle the ServerEventArgs. More... | |
Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandlerFactory | |
virtual | ~AbstractHTTPRequestHandlerFactory () |
Destroy the AbstractHTTPRequestHandlerFactory. | |
virtual Poco::Net::HTTPRequestHandler * | createRequestHandler (const Poco::Net::HTTPServerRequest &request)=0 |
Creates a new HTTPRequestHandler for the given request. More... | |
Defines an abstract HTTP server route.
|
pure virtual |
Determine if this route can handle the given request.
request | The incoming Poco::Net::HTTPServerRequest to be tested. |
isSecurePort | true iff the connection is SSL encrypted. Some implmenetations of this interface may choose to only handle requests on secure ports. |
Implemented in ofx::HTTP::WebSocketRoute, ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, ofx::HTTP::BaseRoute_< IPVideoRouteSettings >, and ofx::HTTP::SSERoute.
|
pure virtual |
Get a pointer to the server.
Implemented in ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, and ofx::HTTP::BaseRoute_< IPVideoRouteSettings >.
|
pure virtual |
Get the route's regex path pattern.
The path pattern is used to match incoming server requests and allows requests to be routed to different routes based on their requested URI.
Implemented in ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, and ofx::HTTP::BaseRoute_< IPVideoRouteSettings >.
|
pure virtual |
Set the parent server.
server | A pointer to the parent server. |
Implemented in ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, and ofx::HTTP::BaseRoute_< IPVideoRouteSettings >.
|
pure virtual |
Stop any pending activity and close this route.
This method may block until the route is fully stopped.
Implemented in ofx::HTTP::IPVideoRoute, ofx::HTTP::WebSocketRoute, ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, ofx::HTTP::BaseRoute_< IPVideoRouteSettings >, and ofx::HTTP::SSERoute.