[#TorControlConnection] = TorControlConnection :mrdocs: Low‐level handling for Tor control connection. Speaks the SMTP‐like protocol as defined in torspec/control‐spec.txt == Synopsis Declared in `<torcontrol.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class TorControlConnection; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:TorControlConnection/ReplyHandlerCB.adoc[`ReplyHandlerCB`] | Callback type invoked with the connection and the reply it received. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:TorControlConnection/2constructor.adoc[`TorControlConnection`] [.small]#[constructor]# | Create a new TorControlConnection. | xref:TorControlConnection/2destructor.adoc[`~TorControlConnection`] [.small]#[destructor]# | Destroy the connection, closing the socket if still open. | xref:TorControlConnection/Command.adoc[`Command`] | Send a command, register a handler for the reply. A trailing CRLF is automatically added. Return true on success. | xref:TorControlConnection/Connect.adoc[`Connect`] | Connect to a Tor control port. tor_control_center is address of the form host:port. Return true on success. | xref:TorControlConnection/Disconnect.adoc[`Disconnect`] | Disconnect from Tor control port. | xref:TorControlConnection/IsConnected.adoc[`IsConnected`] | Check if the connection is established. | xref:TorControlConnection/ReceiveAndProcess.adoc[`ReceiveAndProcess`] | Read available data from socket and process complete replies. Dispatches to registered reply handlers. | xref:TorControlConnection/WaitForData.adoc[`WaitForData`] | Wait for data to be available on the socket. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#