Electroneum
Public Member Functions | Public Attributes | List of all members
net::socks::connector Struct Reference

Primarily for use with epee::net_utils::http_client. More...

#include <socks_connect.h>

Public Member Functions

boost::unique_future< boost::asio::ip::tcp::socket > operator() (const std::string &remote_host, const std::string &remote_port, boost::asio::steady_timer &timeout) const
 

Public Attributes

boost::asio::ip::tcp::endpoint proxy_address
 

Detailed Description

Primarily for use with epee::net_utils::http_client.

Member Function Documentation

◆ operator()()

boost::unique_future< boost::asio::ip::tcp::socket > net::socks::connector::operator() ( const std::string &  remote_host,
const std::string &  remote_port,
boost::asio::steady_timer &  timeout 
) const

Creates a new socket, asynchronously connects to proxy_address, and requests a connection to remote_host on remote_port. Sets socket as closed if timeout is reached.

Returns
The socket if successful, and exception in the future with error otherwise.

Member Data Documentation

◆ proxy_address

boost::asio::ip::tcp::endpoint net::socks::connector::proxy_address

The documentation for this struct was generated from the following files: