-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathproxy-server.hpp
More file actions
30 lines (21 loc) · 840 Bytes
/
proxy-server.hpp
File metadata and controls
30 lines (21 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#include "common.h"
#include "proxy-conn.hpp"
#include <deque>
typedef std::deque<io_service_ptr> ios_deque;
class server {
public:
server(const ios_deque &io_services, std::string_view target, int argc, char **argv, int port,
std::string interface_address, std::string remote_host, int remote_port);
private:
void start_accept();
void handle_accept(connection::pointer new_connection, const std::error_code& error);
ios_deque io_services_;
const asio::ip::tcp::endpoint endpoint_; /**< object, that points to the connection endpoint */
asio::ip::tcp::acceptor acceptor_; /**< object, that accepts new connections */
std::string m_target_name;
std::string m_remote_host;
int m_remote_port;
// non-owned list of target options
std::vector<char *> m_target_options;
};