Comparison

plugins/ping.lua @ 36:fc2cd2f36cdd

plugins.ping: Define xmlns_ping namespace
author Matthew Wild <mwild1@gmail.com>
date Sun, 20 Dec 2009 22:07:20 +0000
parent 34:dd5899412e3f
child 41:1a1bd8cd4bdb
comparison
equal deleted inserted replaced
35:21ee7a1f020d 36:fc2cd2f36cdd
1
2 local xmlns_ping = "urn:xmpp:ping";
1 3
2 function verse.plugins.ping(stream) 4 function verse.plugins.ping(stream)
3 function stream:ping(jid, callback) 5 function stream:ping(jid, callback)
4 local t = socket.gettime(); 6 local t = socket.gettime();
5 stream:send_iq(verse.iq{ to = jid, type = "get" }:tag("ping", { xmlns = xmlns_ping }), 7 stream:send_iq(verse.iq{ to = jid, type = "get" }:tag("ping", { xmlns = xmlns_ping }),