Rewrite WS transport handler

This commit is contained in:
Alexey Khit
2022-12-04 23:24:20 +03:00
parent 69b17230f3
commit b7718b33b8
7 changed files with 84 additions and 69 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import (
const packetSize = 8192
func handlerWS(ctx *api.Context, msg *streamer.Message) {
func handlerWS(ctx *api.Transport, msg *streamer.Message) {
src := ctx.Request.URL.Query().Get("src")
stream := streams.GetOrNew(src)
if stream == nil {
@@ -59,7 +59,7 @@ func handlerWS(ctx *api.Context, msg *streamer.Message) {
cons.Start()
}
func handlerWS4(ctx *api.Context, msg *streamer.Message) {
func handlerWS4(ctx *api.Transport, msg *streamer.Message) {
src := ctx.Request.URL.Query().Get("src")
stream := streams.GetOrNew(src)
if stream == nil {