Connect to the application server through a SOCKS5 server.
Defined in header <boost/socks/connect.hpp>
template< class SyncStream> endpoint connect( SyncStream& s, endpoint const& ep, auth_options const& opt, error_code& ec);
This function establishes a connection to the application server through a SOCKS5 server. This composed operation includes the greeting, sub-negotiation, and connect steps of the SOCKS5 protocol.
The SyncStream
should be
connected to a SOCKS5 server. The endpoint might contain IPv4 or IPv6 addresses.
boost::asio::connect(s, resolver.resolve(socks_host, socks_service)); socks::io::auth::none opt{}; socks::io::connect(s, app_host_endpoint, opt, ec);
Name |
Description |
---|---|
|
SyncStream connected to a SOCKS server. |
|
Application server endpoint. |
|
Authentication options. |
|
Error code. |
server bound address and port
Convenience header <boost/socks.hpp>