TSocketTransport constructor

TSocketTransport({
  1. Socket? socket,
  2. String? host,
  3. int? port = 0,
  4. int timeout = 0,
  5. int connectionTimeout = 6000,
})

Implementation

TSocketTransport(
    {Socket? socket,
    String? host,
    int? port = 0,
    int timeout = 0,
    int connectionTimeout = 6000})
    : _socket = socket,
      _host = host ?? socket?.remoteAddress.address,
      _port = port ?? socket?.port ?? 0,
      _timeout = timeout,
      _connectionTimeout = connectionTimeout {
  _initSocket();
}