# io.github.libtmux.kotlin.ControlClient

- **Module:** io.github.libtmux.kotlin
- **Package:** io.github.libtmux:libtmux-kotlin
- **Language:** Kotlin
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/ControlClient.kt#L15
- **Page:** https://libtmux.org/en/kotlin/latest/reference/io-github-libtmux-kotlin-controlclient/

```
public class ControlClient  : AutoCloseable
```

A tmux client that stays attached and answers one command at a time.

Holds the Java handle privately, so a member here always wins over a same-named catalog-generated
extension in `ControlClientOperations.kt`.

## Members

### Common operations

- `events` (method): State changes tmux volunteers, as a cold [Flow]. Reads, and takes [onSubscribed], as [output] does.
- `output` (method): Terminal output tmux pushes, as a cold [Flow].

### Other members

- `asJava` (property): The Java control client this wraps: the same object, for a Java API that takes one.
- `close` (method): Ends the client, rejecting queued requests and resolving picked requests as uncertain.
- `isAlive` (property): Whether the client is still running.
- `send` (method): Runs one command and waits for its reply.
- `server` (property)
- `standardError` (property): The error text captured from this control process, at most 4096 bytes.
- `standardErrorTruncated` (property): Whether [standardError] stopped before the process finished writing it.
- `unwatch` (method): Stops a watch.
- `watch` (method): Asks tmux to report a format whenever its value changes.
