start_websocket

Function start_websocket 

Source
pub(crate) async fn start_websocket(
    http_state: Arc<HttpState>,
    resource_event_sender: IpcSender<WebSocketNetworkEvent>,
    protocols: &[String],
    client: &Request,
    tls_config: TlsConfig,
    dom_action_receiver: IpcReceiver<WebSocketDomAction>,
) -> Result<Response, Error>
Expand description

Initiate a new async WS connection. Returns an error if the connection fails for any reason, or if the response isn’t valid. Otherwise, the endless WS listening loop will be started.