My Project 3.5.5
C++ Distributed Hash Table
Loading...
Searching...
No Matches
dht::DhtProxyServer Class Reference

#include <dht_proxy_server.h>

Classes

struct  PushStats
struct  ServerStats

Public Types

using clock = std::chrono::steady_clock
using time_point = clock::time_point

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.

Member Typedef Documentation

◆ clock

using dht::DhtProxyServer::clock = std::chrono::steady_clock

Definition at line 101 of file dht_proxy_server.h.

◆ time_point

using dht::DhtProxyServer::time_point = clock::time_point

Definition at line 102 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 164 of file dht_proxy_server.h.

◆ stats()

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

Definition at line 160 of file dht_proxy_server.h.


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