mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 10:42:35 +00:00
made GetName const
This commit is contained in:
1 parent
fdf174c205
commit
9ecaffd447
4 files changed
+16
-14
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2026, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
@@ -9,13 +9,15 @@
|
||||
#ifndef HTTP_PROXY_H__
|
||||
#define HTTP_PROXY_H__
|
||||
|
||||
namespace i2p {
|
||||
namespace proxy {
|
||||
namespace i2p
|
||||
{
|
||||
namespace proxy
|
||||
{
|
||||
class HTTPProxy: public i2p::client::TCPIPAcceptor
|
||||
{
|
||||
public:
|
||||
|
||||
HTTPProxy(const std::string& name, const std::string& address, uint16_t port, const std::string & outproxy,
|
||||
HTTPProxy(const std::string& name, const std::string& address, uint16_t port, const std::string & outproxy,
|
||||
bool addresshelper, bool senduseragent, std::shared_ptr<i2p::client::ClientDestination> localDestination);
|
||||
HTTPProxy(const std::string& name, const std::string& address, uint16_t port, std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr) :
|
||||
HTTPProxy(name, address, port, "", true, false, localDestination) {} ;
|
||||
@@ -28,8 +30,8 @@ namespace proxy {
|
||||
protected:
|
||||
|
||||
// Implements TCPIPAcceptor
|
||||
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket);
|
||||
const char* GetName() { return m_Name.c_str (); }
|
||||
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket) override;
|
||||
const char* GetName() const override { return m_Name.c_str (); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace client
|
||||
virtual void Start () = 0;
|
||||
virtual void Stop () = 0;
|
||||
|
||||
virtual const char* GetName() { return "Generic I2P Service"; }
|
||||
virtual const char* GetName() const { return "Generic I2P Service"; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace client
|
||||
}
|
||||
const typename Protocol::endpoint& GetLocalEndpoint () const { return m_LocalEndpoint; };
|
||||
|
||||
const char* GetName() override { return "Generic TCP/IP accepting daemon"; }
|
||||
const char* GetName() const override { return "Generic TCP/IP accepting daemon"; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2025, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2026, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
@@ -70,14 +70,14 @@ namespace client
|
||||
std::shared_ptr<i2p::stream::Stream> GetStream () const { return m_Stream; };
|
||||
std::shared_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket&> > GetSSL () const { return m_SSL; };
|
||||
uint8_t * GetStreamBuffer () { return m_StreamBuffer; };
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void HandleConnect (const boost::system::error_code& ecode);
|
||||
void HandleHandshake (const boost::system::error_code& ecode);
|
||||
void HandleReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred);
|
||||
void HandleWrite (const boost::system::error_code& ecode);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
uint8_t m_Buffer[I2P_TUNNEL_CONNECTION_BUFFER_SIZE], m_StreamBuffer[I2P_TUNNEL_CONNECTION_STREAM_BUFFER_SIZE];
|
||||
@@ -164,7 +164,7 @@ namespace client
|
||||
void Start ();
|
||||
void Stop ();
|
||||
|
||||
const char* GetName() { return m_Name.c_str (); }
|
||||
const char* GetName() const override { return m_Name.c_str (); }
|
||||
void SetKeepAliveInterval (uint32_t keepAliveInterval);
|
||||
|
||||
private:
|
||||
@@ -208,7 +208,7 @@ namespace client
|
||||
uint16_t GetLocalPort () const { return m_PortDestination->GetLocalPort (); };
|
||||
const boost::asio::ip::tcp::endpoint& GetEndpoint () const { return m_Endpoint; }
|
||||
|
||||
const char* GetName() { return m_Name.c_str (); }
|
||||
const char* GetName() const override { return m_Name.c_str (); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace proxy
|
||||
|
||||
// Implements TCPIPAcceptor
|
||||
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket) override;
|
||||
const char* GetName() { return m_Name.c_str (); }
|
||||
const char* GetName()const override { return m_Name.c_str (); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in new issue
Block a user