olahol / melody

:notes: Minimalist websocket framework for Go
BSD 2-Clause "Simplified" License
3.75k stars 366 forks source link

Get all sessions #52

Closed gabstv closed 2 years ago

gabstv commented 5 years ago

m := melody.New()

sessions, err := m.Sessions()
// throws an error if it's not connected (like every other method)
for _, sess := range sessions {
    sess.Set("key", "val")
}
olahol commented 2 years ago

This has been merged into v1.1.0.