(req, socket, head, { sessionId, path })
| 528 | } |
| 529 | |
| 530 | function proxyWebSocket(req, socket, head, { sessionId, path }) { |
| 531 | const target = upstreamFor(sessionId); |
| 532 | if (!target) { |
| 533 | socket.end("HTTP/1.1 409 Conflict\r\n\r\n"); |
| 534 | return; |
| 535 | } |
| 536 | toUpstreamRequest(req, path); |
| 537 | track(socket); |
| 538 | proxy.proxyWebSocket(req, socket, head, target); |
| 539 | } |
| 540 | |
| 541 | return { |
| 542 | /** The bridge in use, for the caller's own dispose() or tests. */ |
no test coverage detected