mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Respond to the connect
message from a devtools client (#35745)
* Respond to the "connect" message Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Bump log levels in devtools implementation a bit If everything is "debug" then nothing stands out. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
aa26aa1963
commit
e7e8ccea20
3 changed files with 20 additions and 12 deletions
|
@ -12,7 +12,7 @@
|
|||
use std::net::TcpStream;
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
use serde_json::{json, Map, Value};
|
||||
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use crate::actors::device::DeviceActor;
|
||||
|
@ -145,6 +145,13 @@ impl Actor for RootActor {
|
|||
_id: StreamId,
|
||||
) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"connect" => {
|
||||
let message = json!({
|
||||
"from": "root",
|
||||
});
|
||||
let _ = stream.write_json_packet(&message);
|
||||
ActorMessageStatus::Processed
|
||||
},
|
||||
"listAddons" => {
|
||||
let actor = ListAddonsReply {
|
||||
from: "root".to_owned(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue