pub async fn connect( url: &Url, mode: &ConnectionMode, timeout: Duration, ) -> Result<WebSocket, Error>