# `Cauldron2D.Net.Socket`
[🔗](https://github.com/jaman/cauldron/blob/v0.1.3/cauldron_2d_net/lib/cauldron_2d/net/socket.ex#L1)

The player socket a game's browser players connect through, with the channel
`Cauldron2D.Net.Channel` defines.

    defmodule MyGame.Web.UserSocket do
      use Cauldron2D.Net.Socket, channel: MyGame.Web.WorldChannel, verify: {MyGame.Web.Auth, :verify}
    end

`:verify` names a function given the connect params and answering `{:ok, assigns}`
— a map with the player's `:username` and, when the game keeps them, `:settings`
(`:sfx` and `:music` levels) — or `:error`. `:topic` is the channel's topic prefix
(default `"world"`), `:sheet_url` where the sheet is served (default `"/atlas.png"`).

---

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