Socket Recorder
Manual socket capture API. Every method is fail-open so host socket behavior remains isolated. When enabled is false, every method returns immediately without redacting or touching store.
One small function per socket lifecycle/frame event type plus the session-binding helpers; splitting further would fragment one cohesive fail-open recording boundary.
Constructors
Properties
The protocol this recorder stamps onto every connection it opens. See withProtocol.
Functions
Freezes the current app-run for delayed listener callbacks.
A host-initiated cancel is not a failure: it closes the connection like onClosed but with its own SocketLifecycleType.CANCELLED event so it reads as intentional, not an error.
Returns a configured COPY stamped with protocol -- built the same way bindToCurrentSession builds one -- so the facade can hand the same base recorder instance to both a WebSocket and an MQTT adapter without either mutating the other's protocol.
Apply-style, matching withSessionIdProvider/withOperationLock. Fail-open: see canRecord.