Committing for reference
This commit is contained in:
@@ -81,6 +81,11 @@ pub fn extension_main(data: ExtensionData) {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ExtensionOwner {
|
||||
rn: ReqNot<api::ExtMsgSet>,
|
||||
onmessage: Mutex<OnMessage>,
|
||||
}
|
||||
|
||||
fn extension_main_logic(data: ExtensionData) {
|
||||
let api::HostHeader { log_strategy } = api::HostHeader::decode(&mut std::io::stdin().lock());
|
||||
let mut buf = Vec::new();
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
use std::io;
|
||||
use std::pin::pin;
|
||||
|
||||
use async_std::io;
|
||||
use orchid_base::msg::{recv_msg, send_msg};
|
||||
|
||||
pub fn send_parent_msg(msg: &[u8]) -> io::Result<()> { send_msg(&mut io::stdout().lock(), msg) }
|
||||
pub fn recv_parent_msg() -> io::Result<Vec<u8>> { recv_msg(&mut io::stdin().lock()) }
|
||||
pub async fn send_parent_msg(msg: &[u8]) -> io::Result<()> {
|
||||
send_msg(pin!(io::stdout()), msg).await
|
||||
}
|
||||
pub async fn recv_parent_msg() -> io::Result<Vec<u8>> { recv_msg(pin!(io::stdin())).await }
|
||||
|
||||
Reference in New Issue
Block a user