diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 67d8ddcc..8dfdfda9 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -147,7 +147,9 @@ async fn handle_connection(stream: &TcpStream, control: Rc { - debug!("RPC: is_async={} data={:?}", is_async, data); + write_header(&stream, Reply::RPCRequest).await?; + write_bool(&stream, is_async).await?; + stream.send(data.iter().copied()).await?; }, _ => { error!("received unexpected message from core1 while kernel was running: {:?}", reply); diff --git a/src/runtime/src/proto_async.rs b/src/runtime/src/proto_async.rs index 95c24a30..3a35d7c6 100644 --- a/src/runtime/src/proto_async.rs +++ b/src/runtime/src/proto_async.rs @@ -84,6 +84,11 @@ pub async fn write_i8(stream: &TcpStream, value: i8) -> Result<()> { Ok(()) } +pub async fn write_bool(stream: &TcpStream, value: bool) -> Result<()> { + stream.send([value as u8].iter().copied()).await?; + Ok(()) +} + pub async fn write_i32(stream: &TcpStream, value: i32) -> Result<()> { stream.send([ (value >> 24) as u8,