<!--
{
  "availability" : [

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

# readReply()

Read a complete control-protocol reply as an ordered `[String]`.

```
func readReply() throws -> [String]
```

## Return Value

The raw reply lines in receive order. Always
non-empty in the success path.

## Discussion

Assembles one or more [`readLine()`](/documentation/Tor/ControlSocket/readLine()) results into a full reply
by interpreting the fourth byte of each line per
control-spec.txt §2.3: `' '` terminates, `-` continues the
status, and `+` opens a data block terminated by a sole `.`.
Callers receive every raw line (including status-code prefixes)
so downstream [`ControlProtocolParser`](/documentation/Tor/ControlProtocolParser) can classify them.

> Throws: ``doc://Tor/documentation/Tor/TorError/ioError(_:)`` or ``doc://Tor/documentation/Tor/TorError/timeout``
> propagated from ``doc://Tor/documentation/Tor/ControlSocket/readLine()``.

> Important: The function does **not** classify the status code
> as success or failure. Pass the returned lines to
> ``doc://Tor/documentation/Tor/ControlProtocolParser/parseReply(_:)`` for that.