defaultSocketFactory static method

Future<RawSocket> defaultSocketFactory(
  1. String host,
  2. int port,
  3. Duration timeout, {
  4. bool isUnixSocket = false,
})

Implementation

static Future<RawSocket> defaultSocketFactory(
    String host, int port, Duration timeout,
    {bool isUnixSocket = false}) {
  if (isUnixSocket) {
    return RawSocket.connect(
        InternetAddress(host, type: InternetAddressType.unix), port,
        timeout: timeout);
  } else {
    return RawSocket.connect(host, port, timeout: timeout);
  }
}