kick method

bool kick(
  1. int id, [
  2. KickMessage? reason
])

Implementation

bool kick(int id, [KickMessage? reason]) {
  final info = _server?.getConnectionInfo(id);
  if (info == null) return false;
  info.close(
    WebSocketStatus.goingAway,
    reason?.toJson() ?? 'You have been kicked from the server.',
  );
  return true;
}