- Tor
- TorControlEventMessage
Structure
TorControlEventMessage
A parsed 650-status async reply from the Tor control protocol.
struct TorControlEventMessage
Overview
TorControlEventMessage is the raw, typed representation of a single SETEVENTS delivery. It carries the event kind, the verbatim payload line Tor sent, and a lazily-parsed attribute dictionary for key=value fields that appear in most events (circuit status, bandwidth totals, etc.).
Most callers should subscribe to events instead and receive curated TorEvent values. Use TorControlEventMessage when you need access to an event field that swift-tor has not yet promoted into the high-level enum.
Note
Conformance is Sendable; all three fields are value types and safely cross concurrency domains.
Important
attributes is opportunistic — the parser extracts key=value and key="quoted value" pairs from data on a best-effort basis per control-spec.txt §2.3. Events whose payload is not a key=value list will have an empty dictionary and full content in data.
Topics
Creating
Inspection