X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/45dd8543ac140a3326e6a8063bd43bd6c4ad05c8..066f9bcf5a74c255cb64cf89e554cf64ec719f5a:/services/ws/handler.go diff --git a/services/ws/handler.go b/services/ws/handler.go index b07b78cc7c..72291900fa 100644 --- a/services/ws/handler.go +++ b/services/ws/handler.go @@ -53,6 +53,8 @@ func (h *handler) Handle(ws wsConn, eventSource eventSource, newSession func(wsC return } + // Receive websocket frames from the client and pass them to + // sess.Receive(). go func() { buf := make([]byte, 2<<20) for { @@ -84,6 +86,9 @@ func (h *handler) Handle(ws wsConn, eventSource eventSource, newSession func(wsC } }() + // Take items from the outgoing queue, serialize them using + // sess.EventMessage() as needed, and send them to the client + // as websocket frames. go func() { for { var ok bool