TcpSocketClient constructor

TcpSocketClient({
  1. required dynamic host,
  2. required int port,
  3. dynamic sourceAddress,
  4. int sourcePort = 0,
  5. Duration? timeout,
  6. Map? connectData,
  7. Duration? pingInterval,
})

Implementation

TcpSocketClient({
  required this.host,
  required this.port,
  this.sourceAddress,
  this.sourcePort = 0,
  this.timeout,
  Map? connectData,
  Duration? pingInterval,
}) {
  pingInterval ??= Duration(seconds: 1);
  ping_interval = pingInterval;
  if (connectData != null) {
    connect_data.addAll(connect_data);
  }
}