notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit dd7093288b9c4d72d0bba40ff8e0f92b7d970e31
parent db68ae628006a212e7266a89504551932f4ab5ba
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 24 Dec 2023 12:24:28 -0800

relay: add ping method

we will use this to ping relays

Diffstat:
Menostr/src/relay/mod.rs | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/enostr/src/relay/mod.rs b/enostr/src/relay/mod.rs @@ -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)); }