RealtimeTrafficCollector class abstract interface

Contract for coordinating realtime network traffic (WebSocket, SSE, Socket.IO).

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxBodyBytes → int
Maximum byte capacity for captured realtime frames.
no setter
offloadThreshold → int
Byte threshold above which realtime frame payloads should be offloaded to disk.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

canSend(String sessionId) → bool
Whether message transmission is currently permitted on sessionId.
getSender(String sessionId) → RealtimeConnectionSender?
Returns the active RealtimeConnectionSender for sessionId, if attached.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openSession({Uri? uri, String? sessionId, Map<String, String>? headers, RealtimeProtocolType protocolType = RealtimeProtocolType.webSocket}) → RealtimeSessionScope
Opens and returns a RealtimeSessionScope for tracking an active connection.
recordClose({required String sessionId, int? closeCode, String? closeReason}) → void
Records the closure of an active realtime connection.
recordConnection({required String sessionId, required Uri uri, Map<String, String>? headers, RealtimeProtocolType protocolType = RealtimeProtocolType.webSocket}) → void
Records the establishment of a realtime connection (e.g. WebSocket handshake).
recordFrame({required String sessionId, required FrameDirection direction, required FrameType type, required dynamic payload, int? payloadSizeBytes, DateTime? timestamp, String? shortPreview, bool? shouldOffload, String? eventName, Uint8List? preEncodedBytes}) → void
Records an incoming or outgoing frame exchanged over an active connection.
sendMessage(String sessionId, RealtimeMessageDraft draft) → Future<void>
Transmits draft through the active sender registered for sessionId.
shouldCapture(Uri? uri) → bool
Checks if uri is allowed to be captured according to current settings.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance ↔ RealtimeTrafficCollector
The active global RealtimeTrafficCollector instance.
getter/setter pair

Static Methods

markActive() → void
Explicitly marks realtime capability as active on the global collector's engine.