Skip to main content

try_forward

Function try_forward 

Source
pub async fn try_forward(
    app_state: &AppState,
    session_id: &str,
    params: &CallParams,
) -> Option<WebSocketStream<MaybeTlsStream<TcpStream>>>
Expand description

Attempt to forward a websocket to the first peer that hosts session_id.

Returns the connected websocket stream on success, None when no peer accepts the call (or peers are not configured). Only allowed when forward is empty; any present forward value returns None immediately.