MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / send_raw_no_wait

Method send_raw_no_wait

src/cdp.rs:470–490  ·  view source on GitHub ↗

Send a command and return the message ID immediately without waiting for response.

(
        &mut self,
        session_id: Option<&str>,
        method: &str,
        params: Value,
    )

Source from the content-addressed store, hash-verified

468
469 /// Send a command and return the message ID immediately without waiting for response.
470 pub async fn send_raw_no_wait(
471 &mut self,
472 session_id: Option<&str>,
473 method: &str,
474 params: Value,
475 ) -> Result<u64> {
476 let id = self.next_id;
477 self.next_id += 1;
478
479 let mut msg = json!({"id": id, "method": method});
480 if !params.is_null() && params != json!({}) {
481 msg["params"] = params;
482 }
483 if let Some(sid) = session_id {
484 msg["sessionId"] = json!(sid);
485 }
486
487 let text = serde_json::to_string(&msg)?;
488 self.write.send(Message::Text(text)).await?;
489 Ok(id)
490 }
491
492 async fn send_raw(
493 &mut self,

Callers 3

send_rawMethod · 0.80
handle_dialog_helperMethod · 0.80
take_heapsnapshotFunction · 0.80

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected