[#TorControlConnection-Command]
= xref:TorControlConnection.adoc[TorControlConnection]::Command
:relfileprefix: ../
:mrdocs:

Send a command, register a handler for the reply&period; A trailing CRLF is automatically added&period; Return true on success&period;

== Synopsis

Declared in `&lt;torcontrol&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
Command(
    std::string const& cmd,
    xref:TorControlConnection/ReplyHandlerCB.adoc[ReplyHandlerCB] const& reply&lowbar;handler);
----

== Return Value

true on success, false on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cmd*
| Command line to send, without the trailing CRLF&period;
| *reply&lowbar;handler*
| Handler invoked when the reply for this command arrives&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
