@@ -105,7 +111,7 @@ int main(int argc, const char* argv[])
puts("type "QUIT_COMMAND" to end.");
//demonstrate how to use single_service_pump
single_service_pump<single_client>client;
single_service_pump<socks5::single_client>client;
//singel_service_pump also is a service_pump, this let us to control client2 via client
short_clientclient2(client);//without single_client, we need to define ASCS_AVOID_AUTO_STOP_SERVICE macro to forbid service_pump stopping services automatically
...
...
@@ -119,6 +125,9 @@ int main(int argc, const char* argv[])
ip=argv[2];
client.set_server_addr(port,ip);
//without following settings, socks5::single_client will be downgraded to normal single_client
//client.set_peer_addr(6000, "127.0.0.1"); //target server address, original server address becomes SOCK4 server address
//client.set_auth("ascs", "ascs"); //can be omitted if the SOCKS5 server support non-auth
virtualboolon_msg_handle(out_msg_type&msg){returndirect_send_msg(std::move(msg));}//packer and unpacker have the same type of message
//virtual bool on_msg_handle(out_msg_type& msg) {return send_native_msg(msg.peer_addr, std::move(msg));} //packer and unpacker have different types of message