HttpService Class Reference

#include <Pt/JsonRpc/HttpService.h>

HTTP service for JSON-RPC 2.0. More...

Inherits Service.

Public Member Functions

 HttpService (const ServiceDeclaration &decl, Remoting::ServiceDefinition &def)
 Constructs with ServiceDeclaration and ServiceDefinition.
virtual ~HttpService ()
 Destructor.
RespondergetResponder (const Request &)
 Creates a responder to handle request received by a server.
void releaseResponder (Responder *)
 Destroys a responder created by a server.
Signal< IOStream *, const std::string & > & upgradeRequested ()
 Returns the signal emitted when a request upgrades to this service.

Protected Member Functions

virtual Http::ResponderonGetResponder (const Http::Request &request)
 Creates a responder to handle request received by a server.
virtual void onReleaseResponder (Http::Responder *resp)
 Destroys a responder created by a server.

Detailed Description

Makes the procedures registered in a ServiceDeclaration available as a HTTP service. Use the HttpClient to call RemoteProcedures on this service.

Member Function Documentation

◆ upgradeRequested()

Signal< IOStream *, const std::string & > & upgradeRequested ( )
inherited

The signal provides the accepted stream and the value of the request's Upgrade header.