RawApiClient constructor

RawApiClient({
  1. required int port,
  2. required String host,
  3. int idWidth = 4,
  4. void onConnect(
    1. Socket socket
    )?,
  5. void onReceive(
    1. Socket socket,
    2. Uint8List data
    )?,
  6. void onDisconnect(
    1. Socket socket
    )?,
})

Create a new RawApiClient given a port and a host. Callbacks can be optionally provided.

Implementation

RawApiClient({
  required this.port,
  required this.host,
  this.idWidth = 4,
  this.onConnect,
  this.onReceive,
  this.onDisconnect,
}) {
  _checkValidIdWidth();
}