NewWebsocketSession creates new sockjs.Session from existing websocket connection.
(conn *websocket.Conn)
| 179 | // NewWebsocketSession creates new sockjs.Session from existing |
| 180 | // websocket connection. |
| 181 | func NewWebsocketSession(conn *websocket.Conn) *WebsocketSession { |
| 182 | return &WebsocketSession{ |
| 183 | conn: conn, |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | // RemoteAddr gives network address of the remote client. |
| 188 | func (w *WebsocketSession) RemoteAddr() string { |