WS proxy handler

WS proxy handler makes websocket “request” to luna-sender and adapts receivied events to proper format.

Module contains proxy handler for websockets

class luna_api.app.handlers.ws_proxy_handler.WSProxyHandler(request, ws)[source]

Handler for proxying ws connection

upstreamWs

open websocket connection to sender

Type:

Optional[ClientWebSocketResponse]

async get(ws)[source]

WS proxy handler.

Returns:

ws response

wsSession(request)[source]

Web socket session.

Validate input data and open connection to luna-sender before websocket handshake.