ZenWebsocket.Client.Recorder (ZenWebsocket v0.8.0)

Copy Markdown View Source

Session recorder lifecycle and frame writes for ZenWebsocket.Client.

Summary

Functions

Records a frame when a recorder process exists.

Starts a session recorder when record_to is a path.

Stops a session recorder if it is still alive.

Functions

maybe_record(recorder_pid, direction, frame)

@spec maybe_record(pid() | nil, ZenWebsocket.Recorder.direction(), term()) :: :ok

Records a frame when a recorder process exists.

maybe_start(path)

@spec maybe_start(String.t() | nil) :: pid() | nil

Starts a session recorder when record_to is a path.

maybe_stop(recorder_pid)

@spec maybe_stop(pid() | nil) :: :ok

Stops a session recorder if it is still alive.