mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-03 16:34:20 +01:00
relay: add ping method
we will use this to ping relays
This commit is contained in:
@@ -63,6 +63,11 @@ impl Relay {
|
||||
self.sender.send(txt);
|
||||
}
|
||||
|
||||
pub fn ping(&mut self) {
|
||||
let msg = WsMessage::Ping(vec![]);
|
||||
self.sender.send(msg);
|
||||
}
|
||||
|
||||
pub fn subscribe(&mut self, subid: String, filters: Vec<Filter>) {
|
||||
self.send(&ClientMessage::req(subid, filters));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user