# io.github.libtmux.scaladsl.cats.LiveServer.attach

- **Module:** io.github.libtmux.scaladsl.cats
- **Package:** io.github.libtmux:libtmux-scala_3
- **Language:** Scala
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-scala-cats/src/main/scala/io/github/libtmux/scaladsl/cats/LiveServer.scala#L39
- **Page:** https://libtmux.org/en/scala/latest/reference/io-github-libtmux-scaladsl-cats-liveserver-attach/

```
def attach[F[_]](
      anchor: Session[F]
  )(implicit F: Async[F]): Resource[F, LiveServer[F]]
```

Listens through a control client attached to `anchor`, rebuilding on every announcement. The session is a required parameter: there is no arbitrary pick left to make, and a session that later disappears is `ServerMirror`'s own reconnect-or-`TargetGoneException` policy, surfaced through [[LiveServer#failure]] like any other cause.

## Parameters

- `anchor` (`Session[F]`)
- `F` (`Async[F]`)
