SessionsWebSocket constructor

SessionsWebSocket(
  1. String _sessionId,
  2. String _orgUuid,
  3. String _getAccessToken(),
  4. SessionsWebSocketCallbacks _callbacks, {
  5. String baseWsUrl = 'wss://api.anthropic.com',
})

Create a new SessionsWebSocket.

sessionId identifies the remote CCR session. orgUuid is the Anthropic organization UUID. getAccessToken returns a fresh OAuth token for each connection attempt. callbacks receives lifecycle events. baseWsUrl overrides the default WebSocket base URL (useful for testing).

Implementation

SessionsWebSocket(
  this._sessionId,
  this._orgUuid,
  this._getAccessToken,
  this._callbacks, {
  String baseWsUrl = 'wss://api.anthropic.com',
}) : _baseWsUrl = baseWsUrl;