client: ALL the debugging on

Sat, 05 Sep 2015 23:28:21 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 05 Sep 2015 23:28:21 +0100
changeset 10
75bf4c021461
parent 9
15e9d47941bd
child 11
48c77c05b9ba

client: ALL the debugging on

scansion/objects/client.lua file | annotate | diff | comparison | revisions
--- a/scansion/objects/client.lua	Sat Sep 05 23:27:56 2015 +0100
+++ b/scansion/objects/client.lua	Sat Sep 05 23:28:21 2015 +0100
@@ -13,6 +13,12 @@
 	_validate = function (client)
 		assert(client.jid, "No JID specified");
 		client.stream = verse.new();
+		client.stream:hook("stanza", function (stanza) print("Stanza:", stanza) end);
+
+		-- This one prints all received data
+		client.stream:hook("incoming-raw", print, 1000);
+		client.stream:hook("outgoing-raw", print, 1000);
+
 	end;
 
 	connects = function (client)

mercurial