windows clipboard

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-02-14 17:34:09 +08:00
parent 8bb4183098
commit 6672087f7c
22 changed files with 4506 additions and 1 deletions

View File

@@ -137,6 +137,12 @@ impl<T: Subscriber + From<ConnInner>> ServiceTmpl<T> {
self.send_shared(Arc::new(msg));
}
pub fn send_to(&self, msg: Message, id: i32) {
if let Some(s) = self.0.write().unwrap().subscribes.get_mut(&id) {
s.send(Arc::new(msg));
}
}
pub fn send_shared(&self, msg: Arc<Message>) {
let mut lock = self.0.write().unwrap();
for s in lock.subscribes.values_mut() {