Browse Source

Merge branch 'master' of https://github.com/ReforgedStudios/melody into ReforgedStudios-master

master
Ola Holmström 8 years ago
parent
commit
ca5ae7e3c4
  1. 3
      melody.go
  2. 1
      session.go

3
melody.go

@ -88,6 +88,7 @@ func (m *Melody) HandleRequest(w http.ResponseWriter, r *http.Request) {
session := &Session{
Request: r,
Params: make(map[string]interface{}),
conn: conn,
output: make(chan *envelope, m.Config.MessageBufferSize),
melody: m,
@ -95,7 +96,7 @@ func (m *Melody) HandleRequest(w http.ResponseWriter, r *http.Request) {
m.hub.register <- session
go m.connectHandler(session)
m.connectHandler(session)
go session.writePump()

1
session.go

@ -10,6 +10,7 @@ import (
// Session is wrapper around websocket connections.
type Session struct {
Request *http.Request
Params map[string]interface{}
conn *websocket.Conn
output chan *envelope
melody *Melody

Loading…
Cancel
Save