|
OpenSDN source code
|
#include <http_server.h>


Public Types | |
| typedef boost::function< void(HttpSession *session, const HttpRequest *)> | HttpHandlerFn |
Public Types inherited from SslServer | |
| typedef boost::asio::ssl::stream< boost::asio::ip::tcp::socket > | SslSocket |
Public Types inherited from TcpServer | |
| typedef boost::asio::ip::tcp::endpoint | Endpoint |
| typedef boost::asio::ip::tcp::socket | Socket |
| typedef boost::asio::ip::tcp::socket::native_handle_type | NativeSocketType |
Public Member Functions | |
| HttpServer (EventManager *evm, const SslConfig &config=SslConfig(), uint8_t dscp=0) | |
| virtual | ~HttpServer () |
| virtual SslSession * | AllocSession (SslSocket *socket) |
| virtual bool | AcceptSession (SslSession *session) |
| virtual bool | AcceptSession (TcpSession *session) |
| void | RegisterHandler (const std::string &path, HttpHandlerFn handler) |
| HttpHandlerFn | GetHandler (const std::string &path) |
| void | Shutdown () |
| void | UpdateDscp (uint8_t value) |
Public Member Functions inherited from SslServer | |
| SslServer (EventManager *evm, boost::asio::ssl::context::method m, bool ssl_enabled=true, bool ssl_handshake_delayed=false) | |
| virtual | ~SslServer () |
Public Member Functions inherited from TcpServer | |
| TcpServer (EventManager *evm) | |
| virtual | ~TcpServer () |
| virtual bool | Initialize (unsigned short port) |
| virtual bool | Initialize (unsigned short port, const IpAddress &host_ip, int intf_id=-1) |
| bool | InitializeInternal (boost::asio::ip::tcp::endpoint localaddr) |
| const std::string | ToString () const |
| void | SetAcceptor () |
| void | ResetAcceptor () |
| void | Shutdown () |
| void | ClearSessions () |
| void | UpdateSessionsDscp (uint8_t dscp) |
| virtual TcpSession * | CreateSession () |
| virtual void | DeleteSession (TcpSession *session) |
| virtual void | Connect (TcpSession *session, Endpoint remote) |
| virtual bool | DisableSandeshLogMessages () const |
| int | GetPort () const |
| const io::SocketStats & | GetSocketStats () const |
| size_t | GetSessionCount () const |
| EventManager * | event_manager () |
| bool | HasSessionReadAvailable () const |
| bool | HasSessions () const |
| TcpSession * | GetSession (Endpoint remote) |
| void | WaitForEmpty () |
| void | GetRxSocketStats (SocketIOStats *socket_stats) const |
| void | GetTxSocketStats (SocketIOStats *socket_stats) const |
| void | GetRxSocketStats (SocketIOStats &socket_stats) const |
| void | GetTxSocketStats (SocketIOStats &socket_stats) const |
| int | SetMd5SocketOption (NativeSocketType fd, uint32_t peer_ip, const std::string &md5_password) |
| int | SetListenSocketMd5Option (uint32_t peer_ip, const std::string &md5_password) |
| int | SetDscpSocketOption (NativeSocketType fd, uint8_t value) |
| uint8_t | GetDscpValue (NativeSocketType fd) const |
| int | SetListenSocketDscp (uint8_t value) |
| int | SetSocketOptions (const SandeshConfig &sandesh_config) |
| int | SetKeepAliveSocketOption (int fd, const SandeshConfig &sandesh_config) |
Private Types | |
| typedef std::map< std::string, HttpHandlerFn > | HandlerTrie |
Private Member Functions | |
| DISALLOW_COPY_AND_ASSIGN (HttpServer) | |
Private Attributes | |
| HandlerTrie | http_handlers_ |
| uint8_t | dscp_value_ |
Additional Inherited Members | |
Protected Types inherited from TcpServer | |
| typedef boost::intrusive_ptr< TcpServer > | TcpServerPtr |
| typedef boost::intrusive_ptr< TcpSession > | TcpSessionPtr |
Protected Member Functions inherited from SslServer | |
| boost::asio::ssl::context * | context () |
Protected Member Functions inherited from TcpServer | |
| void | set_socket_open_failure (bool flag) |
| bool | socket_open_failure () const |
| Endpoint | LocalEndpoint () const |
Definition at line 35 of file http_server.h.
|
private |
Definition at line 53 of file http_server.h.
| typedef boost::function<void(HttpSession *session, const HttpRequest *)> HttpServer::HttpHandlerFn |
Definition at line 38 of file http_server.h.
|
explicit |
|
virtual |
Definition at line 67 of file http_server.cc.
|
virtual |
|
virtual |
Reimplemented from TcpServer.
Definition at line 84 of file http_server.cc.

|
virtual |
Implements SslServer.
Reimplemented in MetadataServer.
Definition at line 76 of file http_server.cc.

|
private |
| HttpServer::HttpHandlerFn HttpServer::GetHandler | ( | const std::string & | path | ) |
Definition at line 106 of file http_server.cc.
| void HttpServer::RegisterHandler | ( | const std::string & | path, |
| HttpHandlerFn | handler | ||
| ) |
Definition at line 102 of file http_server.cc.
| void HttpServer::Shutdown | ( | void | ) |
| void HttpServer::UpdateDscp | ( | uint8_t | value | ) |
|
private |
Definition at line 55 of file http_server.h.
|
private |
Definition at line 54 of file http_server.h.