31:f1e9d1d7cf5d | 32:391048601d54 |
---|---|
1 | |
2 function verse.plugins.ping(stream) | |
3 function stream:ping(jid, callback) | |
4 local t = socket.gettime(); | |
5 stream:send_iq(verse.iq{ to = jid, type = "get" }:tag("ping", { xmlns = xmlns_ping }), | |
6 function (reply) | |
7 callback(socket.gettime()-t, jid); | |
8 end); | |
9 end | |
10 end |