registerClient method

void registerClient(
  1. ClientInfo client
)

Registers a new client with the server.

Implementation

void registerClient(ClientInfo client) {
  if (_started) {
    throw StateError(
        'You cannot register new clients after the server has started listening.');
  } else {
    _clients.add(client);
  }
}