# `LocalLiveView.Socket`
[🔗](https://github.com/software-mansion/popcorn/blob/llv-v0.1.0/local-live-view/lib/server/socket.ex#L1)

The `Phoenix.Socket` local live views connect to.

Mount it in your endpoint:

```
socket "/llv_socket", LocalLiveView.Socket,
  websocket: [connect_info: [session: @session_options]]
```

The socket is only needed by views that sync assigns to a mirror; a purely
local view never connects. `mix llv.install` adds the entry above
automatically.

Connections are rejected unless the client sends a CSRF token matching the
one in the session, so `connect_info` must carry the session.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
