Asynchronously connect to the application server through a SOCKS4 server.
Defined in header <boost/socks/connect_v4.hpp>
template< class AsyncStream, class CompletionToken> DEDUCED async_connect_v4( AsyncStream& s, endpoint const& ep, string_view ident_id, CompletionToken&& token);
After this operation, the client can communicate All SOCKS4 CONNECT requests
contain a ident_id
to identify
the user, where a connection without authentication can be represented with
an empty id.
The AsyncStream
should be
connected to a SOCKS4 server. The endpoint must contain an IPv4 address.
boost::asio::connect(s, resolver.resolve(socks_host, socks_service)); socks_io::async_connect_v4( s, app_host_endpoint, "username", ec, [](error_code ec, endpoint ep) { if (!ec.failed()) { // write to the application host do_write(); } });
Name |
Description |
---|---|
|
SyncStream connected to a SOCKS server. |
|
Application server endpoint. |
|
Client ident ID. |
|
Completion token. |
server bound address and port
Convenience header <boost/socks.hpp>