DefaultRealtimeTrafficCollector class

Default implementation of RealtimeTrafficCollector backed by InspectorSession.

Implemented types

Constructors

DefaultRealtimeTrafficCollector({InspectorSession? session})
Creates a collector backed by session or InspectorSession.instance.

Properties

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

Methods

canSend(String sessionId) → bool
Whether message transmission is currently permitted on sessionId.
override
getSender(String sessionId) → RealtimeConnectionSender?
Returns the active RealtimeConnectionSender for sessionId, if attached.
override
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.
override
recordClose({required String sessionId, int? closeCode, String? closeReason}) → void
Records the closure of an active realtime connection.
override
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).
override
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.
override
sendMessage(String sessionId, RealtimeMessageDraft draft) → Future<void>
Transmits draft through the active sender registered for sessionId.
override
shouldCapture(Uri? uri) → bool
Checks if uri is allowed to be captured according to current settings.
override
toString() → String
A string representation of this object.
inherited

Operators

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