288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
# File 'lib/tipi/digital_fabric/agent_proxy.rb', line 288
def handle_websocket_upgrade(req)
with_request do |id|
send_df_message(Protocol.ws_request(id, req.))
response = receive
case response[0]
when Protocol::WS_RESPONSE
= response[2] || {}
status = [':status'] || Qeweney::Status::SWITCHING_PROTOCOLS
if status != Qeweney::Status::SWITCHING_PROTOCOLS
req.respond(nil, )
return
end
ws = Tipi::Websocket.new(req.adapter.conn, req.)
run_websocket_connection(id, ws)
else
req.respond(nil, ':status' => Qeweney::Status::SERVICE_UNAVAILABLE)
end
end
rescue IOError, SystemCallError
end
|