cloudflare / chrome-devtools-rs

Rust library for the Chrome Devtools Protocol
MIT License
62 stars 4 forks source link

[wip] create websocket api #33

Closed EverlastingBugstopper closed 4 years ago

EverlastingBugstopper commented 4 years ago

this pr allows users of this library to connect to an arbitrary websocket and send/receive messages with the devtools protocol

beginning usage will hopefully look something like this

use chrome_devtools as cdp;

let socket_url = format!("wss://rawhttp.cloudflareworkers.com/inspect/{}", session_id);
let client = cdp::Client::new(&socket_url)?;
let connection = client.connect().await?;
connection.enable(cdp::Runtime).await?;