# Libtmux_unix.Subscription.wait_for_bytes

- **Module:** Libtmux_unix
- **Package:** libtmux-unix
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/unix/libtmux_unix.mli#L172
- **Public owner:** Libtmux_unix
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_unix-subscription-wait_for_bytes/

```
val wait_for_bytes :
  ?cancel:Cancellation.t ->
  ?timeout:float ->
  t ->
  text:string -> (Libtmux.Output.cursor, Libtmux.Output.wait_error) result
```

Consume future bytes until the nonempty pattern matches, including across Data boundaries. Maximum pattern: 64 KiB. Return the cursor at the match's end within its consumed event. Gaps stop matching; no rendered or earlier output is searched. Timeout leaves the subscription active.

## Parameters

- `cancel?` (`Cancellation.t`)
- `timeout?` (`float`)
- `arg1` (`t`)
- `text` (`string`)
