HttpService Class Reference

#include <Pt/XmlRpc/HttpService.h>

HTTP service for XML-RPC. More...

Inherits Service.

Public Member Functions

 HttpService (Remoting::ServiceDefinition &rpcService)
 Constructs with RPC service.
virtual ~HttpService ()
 Destructor.
Responder * getResponder (const Request &)
 Creates a responder to handle request received by a server.
void releaseResponder (Responder *)
 Destroys a responder created by a server.

Protected Member Functions

virtual Http::Responder * onGetResponder (const Http::Request &)
 Creates a responder to handle request received by a server.
virtual void onReleaseResponder (Http::Responder *resp)
 Destroys a responder created by a server.
virtual void onUpgrade (Stream &stream, const Request &request, const Reply &reply)
 Called when a 101 reply has upgraded a connection.

Detailed Description

The HttpService makes the procedures registered in a XML-RPC ServiceDefinition available as a HTTP service. Use the HttpClient to run a RemoteProcedure accessing this service.

Member Function Documentation

◆ onUpgrade()

virtual void onUpgrade ( Stream & stream,
const Request & request,
const Reply & reply )
protectedvirtualinherited

Runs on the server thread with the Stream the server owns. request and reply are the exchange that finished the

  1. They are valid until this call returns. The responder has already been released. Bind a Channel to stream to accept it. The empty implementation leaves the stream unbound, and the server closes it.

Reimplemented in WebSocketService.