|
pion-net
4.0.9
|
#include <WebService.hpp>
Inherits noncopyable.
Inherited by pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, pion::plugins::FileService, pion::plugins::HelloService, and pion::plugins::LogService.
Classes | |
| class | UnknownOptionException |
| exception thrown if the service does not recognize a configuration option More... | |
Public Member Functions | |
| WebService (void) | |
| default constructor | |
| virtual | ~WebService () |
| virtual destructor | |
| virtual void | operator() (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0 |
| virtual void | setOption (const std::string &name, const std::string &value) |
| virtual void | start (void) |
| called when the web service's server is starting | |
| virtual void | stop (void) |
| called when the web service's server is stopping | |
| void | setResource (const std::string &str) |
| sets the URI stem or resource that is bound to the web service | |
| const std::string & | getResource (void) const |
| returns the URI stem or resource that is bound to the web service | |
| std::string | getRelativeResource (const std::string &resource_requested) const |
| returns the path to the resource requested, relative to the web service's location | |
WebService: interface class for web services
Definition at line 28 of file WebService.hpp.
|
pure virtual |
attempts to handle a new HTTP request
| request | the new HTTP request to handle |
| tcp_conn | the TCP connection that has the new request |
Implemented in pion::plugins::FileService, pion::plugins::LogService, pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, and pion::plugins::HelloService.
Referenced by ~WebService().
|
inlinevirtual |
sets a configuration option
| name | the name of the option to change |
| value | the value of the option |
Reimplemented in pion::plugins::FileService.
Definition at line 60 of file WebService.hpp.
Referenced by pion::net::WebServer::setServiceOption().
1.8.11