connectIp method

Future<void> connectIp(
  1. InternetAddress ip,
  2. int port
)

Implementation

Future<void> connectIp(InternetAddress ip, int port) async {
  _request = SOCKSRequest(
    command: SOCKSCommand.Connect,
    addressType: ip.type == InternetAddressType.IPv4
        ? SOCKSAddressType.IPv4
        : SOCKSAddressType.IPv6,
    address: ip.rawAddress,
    port: port,
  );
  await _start();
  await _waitForConnect;
}