My Project 3.2.0
C++ Distributed Hash Table
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
dht::DhtProxyServer Class Reference

#include <dht_proxy_server.h>

Classes

struct  ServerStats
 

Public Member Functions

 DhtProxyServer (const std::shared_ptr< DhtRunner > &dht, const ProxyServerConfig &config={}, const std::shared_ptr< log::Logger > &logger={})
 
 DhtProxyServer (const DhtProxyServer &other)=delete
 
 DhtProxyServer (DhtProxyServer &&other)=delete
 
DhtProxyServeroperator= (const DhtProxyServer &other)=delete
 
DhtProxyServeroperator= (DhtProxyServer &&other)=delete
 
asio::io_context & io_context () const
 
std::shared_ptr< ServerStatsstats () const
 
std::shared_ptr< ServerStatsupdateStats (std::shared_ptr< NodeInfo > info) const
 
std::shared_ptr< DhtRunnergetNode () const
 

Detailed Description

Describes the REST API

Definition at line 77 of file dht_proxy_server.h.

Constructor & Destructor Documentation

◆ DhtProxyServer()

dht::DhtProxyServer::DhtProxyServer ( const std::shared_ptr< DhtRunner > & dht,
const ProxyServerConfig & config = {},
const std::shared_ptr< log::Logger > & logger = {} )

Start the Http server for OpenDHT

Parameters
dhtthe DhtRunner linked to this proxy server
portto listen
pushServerwhere to push notifications
Note
if the server fails to start (if port is already used or reserved), it will fails silently

Member Function Documentation

◆ getNode()

std::shared_ptr< DhtRunner > dht::DhtProxyServer::getNode ( ) const
inline

Definition at line 150 of file dht_proxy_server.h.

◆ stats()

std::shared_ptr< ServerStats > dht::DhtProxyServer::stats ( ) const
inline

Definition at line 146 of file dht_proxy_server.h.


The documentation for this class was generated from the following file: