SessionsWebSocket constructor
SessionsWebSocket(
- String _sessionId,
- String _orgUuid,
- String _getAccessToken(),
- SessionsWebSocketCallbacks _callbacks, {
- 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;