22 lines
577 B
C++
22 lines
577 B
C++
#ifndef PROXYLISTENER_H
|
|
#define PROXYLISTENER_H
|
|
|
|
#include <boost/asio/io_context.hpp>
|
|
#include <boost/asio/ip/tcp.hpp>
|
|
|
|
class ProxyListener : public std::enable_shared_from_this<ProxyListener> {
|
|
public:
|
|
ProxyListener(boost::asio::io_context &ioContext, boost::asio::ip::tcp::endpoint endpoint);
|
|
void run(boost::system::error_code &error);
|
|
|
|
protected:
|
|
void doAccept();
|
|
|
|
private:
|
|
boost::asio::io_context &m_ioContext;
|
|
boost::asio::ip::tcp::acceptor m_acceptor;
|
|
boost::asio::ip::tcp::endpoint m_endpoint;
|
|
};
|
|
|
|
#endif // PROXYLISTENER_H
|