mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-13 12:33:20 +02:00
32 lines
672 B
C++
32 lines
672 B
C++
#ifndef NET_PROXYCONNECTOR_HPP
|
|
#define NET_PROXYCONNECTOR_HPP
|
|
|
|
#include<memory>
|
|
#include<utility>
|
|
#include"Net/Connector.hpp"
|
|
|
|
namespace Net {
|
|
|
|
class ProxyConnector : public Connector {
|
|
private:
|
|
std::unique_ptr<Net::Connector> base;
|
|
std::string proxy_host;
|
|
int proxy_port;
|
|
|
|
public:
|
|
ProxyConnector() =delete;
|
|
explicit ProxyConnector( std::unique_ptr<Net::Connector> base_
|
|
, std::string proxy_host_
|
|
, int proxy_port_
|
|
) : base(std::move(base_))
|
|
, proxy_host(std::move(proxy_host_))
|
|
, proxy_port(proxy_port_)
|
|
{ }
|
|
|
|
Net::SocketFd
|
|
connect(std::string const& host, int port) override;
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* NET_PROXYCONNECTOR_HPP */
|