Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created September 25, 2022 17:27
Show Gist options
  • Save percybolmer/4dc4861b142f0394ee55f874fb1da48f to your computer and use it in GitHub Desktop.
Save percybolmer/4dc4861b142f0394ee55f874fb1da48f to your computer and use it in GitHub Desktop.
// Client is a websocket client, basically a frontend visitor
type Client struct {
// the websocket connection
connection *websocket.Conn
// manager is the manager used to manage the client
manager *Manager
// egress is used to avoid concurrent writes on the WebSocket
egress chan Event
// chatroom is used to know what room user is in
chatroom string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment