X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bdb92619b5f6d920119b8c32c3027cf4b751ed16..6c40c1c5b000b2eb0967df0f7ebaf613393501bc:/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