--- a/lm.lua Sun Jun 26 16:28:53 2011 +0300
+++ b/lm.lua Sun Jun 26 19:59:28 2011 +0300
@@ -199,9 +199,10 @@
end
-- the same table, as for lm.connection.create, but with few more fields:
--- ssl.validate
--- onconnect
--- onopen
+-- ssl.validate - boolean
+-- preopen - callback to call after connection creation but before opening (to install log handler, for example)
+-- onopen - callback to call after connection is established, but before authentication
+-- onconnect - callback to call after connection will be established
-- username
-- password
-- resource
@@ -218,6 +219,9 @@
end
end
local c = lm.connection.create ( a )
+ if type ( a.preopen ) == "function" then
+ a.preopen ( c ) -- XXX
+ end
c:open (
function ( obj, status )
if status then
@@ -237,4 +241,4 @@
return lm
--- vim: se ts=4: --
+-- vim: se ts=4 sw=4: --