<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorControlClient/sendRaw(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A13ControlClientC7sendRawyS2SYaKF"
  },
  "title" : "sendRaw(_:)"
}
-->

# sendRaw(_:)

Escape-hatch: send an arbitrary control command and return the
concatenated reply body.

```
func sendRaw(_ line: String) async throws -> String
```

## Parameters

`line`

The command body, without CRLF terminator.

## Return Value

The reply lines joined with `\n`.

## Discussion

Intended for control commands swift-tor has not yet modelled
(e.g. `HSFETCH`, `MAPADDRESS`, `DROPTIMEOUTS`). The response
lines are joined with `\n` for consumer convenience.

> Throws: ``doc://Tor/documentation/Tor/TorError/ioError(_:)`` on transport failure.

> Important: Does **not** classify success vs failure. Callers
> must inspect the returned string (or the underlying
> ``doc://Tor/documentation/Tor/ControlSocket/sendCommand(_:)``) and react appropriately.
> Prefer the typed methods (``doc://Tor/documentation/Tor/TorControlClient/getInfo(_:)-6m7om``,
> ``doc://Tor/documentation/Tor/TorControlClient/signal(_:)``, etc.) whenever one exists.