TcpClient constructor

TcpClient(
  1. String host,
  2. int port, {
  3. Uint8List? terminatorBytes,
  4. Duration timeout = const Duration(seconds: 2),
})

terminatorBytes determines when a new item will be added to the data stream, for most TCP connections, the terminator is \r\n but some protocols might determine their own if this is set to null, data will be piped directly from the socket to the datastream as it comes in.

Implementation

TcpClient(
  this.host,
  this.port, {
  this.terminatorBytes,
  this.timeout = const Duration(seconds: 2),
});