activate method

AcpServerConnectionState activate(
  1. String connectionId
)

Publishes a pending connection after successful initialization.

Implementation

AcpServerConnectionState activate(String connectionId) {
  final AcpServerConnectionState? state = _pending.remove(connectionId);
  if (state == null) {
    throw StateError('Unknown pending ACP connection: $connectionId');
  }
  if (state.isClosed) {
    throw StateError('Cannot activate a closed ACP connection');
  }
  _active[connectionId] = state;
  return state;
}