kick method
- int id, [
- 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;
}