mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-04 05:31:32 +00:00
kratart: support for krata channels for two-way byte communication
This commit is contained in:
@ -43,7 +43,7 @@ impl XsPermission {
|
||||
}
|
||||
|
||||
pub struct XsdWatchHandle {
|
||||
id: u32,
|
||||
pub id: u32,
|
||||
unwatch_sender: Sender<u32>,
|
||||
pub receiver: Receiver<String>,
|
||||
}
|
||||
@ -202,7 +202,11 @@ impl XsdClient {
|
||||
}
|
||||
|
||||
pub async fn bind_watch<P: AsRef<str>>(&self, handle: &XsdWatchHandle, path: P) -> Result<()> {
|
||||
let id_string = handle.id.to_string();
|
||||
self.bind_watch_id(handle.id, path).await
|
||||
}
|
||||
|
||||
pub async fn bind_watch_id<P: AsRef<str>>(&self, id: u32, path: P) -> Result<()> {
|
||||
let id_string = id.to_string();
|
||||
let _ = self
|
||||
.socket
|
||||
.send(0, XSD_WATCH, &[path.as_ref(), &id_string])
|
||||
|
Reference in New Issue
Block a user