Exemple #1
0
// newWebSocketConn wrap a exist websocket connection and url variables to a
// new webSocketConn
func newWebSocketConn(e Environment, conn *websocket.Conn, varIndexer URLVarIndexer) *webSocketConn {
	return &webSocketConn{
		Environment:   e,
		Conn:          conn,
		URLVarIndexer: varIndexer,
		request:       conn.Request(),
	}
}
Exemple #2
0
func newWsConn(e Env, conn *websocket.Conn, vars *ReqVars) *wsConn {
	return &wsConn{
		Env:     e,
		Conn:    conn,
		vars:    vars,
		request: conn.Request(),
	}
}