Instance Method
stop()
Stop the Tor instance and release any resources.
func stop() async
Discussion
Stopping is best-effort and non-throwing: if Tor is already idle, stopped, or in .failed, this is a no-op. A running production conformer sends SIGNAL SHUTDOWN through its embedded control client (per control-spec.txt §3.7), waits for tor_run_main() to return, closes the control socket, and optionally removes the data directory when configuration.ownsDataDirectory is true.
Important
After this call returns, the events stream is terminated (no more values are emitted) and socksEndpoint reverts to nil. Calling start() again on the same instance is supported and creates a fresh data directory when configuration specifies an ephemeral path.