|
|
@ -10,7 +10,7 @@ import ( |
|
|
|
// A melody session.
|
|
|
|
type Session struct { |
|
|
|
Request *http.Request |
|
|
|
params map[string]string |
|
|
|
Params map[string]interface{} |
|
|
|
conn *websocket.Conn |
|
|
|
output chan *envelope |
|
|
|
melody *Melody |
|
|
@ -118,13 +118,3 @@ func (s *Session) WriteBinary(msg []byte) { |
|
|
|
func (s *Session) Close() { |
|
|
|
s.writeMessage(&envelope{t: websocket.CloseMessage, msg: []byte{}}) |
|
|
|
} |
|
|
|
|
|
|
|
// Set session param
|
|
|
|
func (s *Session) SetParam(key string, value string) { |
|
|
|
s.params[key] = value |
|
|
|
} |
|
|
|
|
|
|
|
// Get session param
|
|
|
|
func (s *Session) GetParam(key string) string { |
|
|
|
return s.params[key] |
|
|
|
} |