net.server: Call handler's status() to notify it of ssl handshake success

Sun, 04 Oct 2009 15:58:21 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 04 Oct 2009 15:58:21 +0100
changeset 1883
6866cf298701
parent 1882
ad04cac04354
child 1884
6eaa440bc9fc

net.server: Call handler's status() to notify it of ssl handshake success

net/server.lua file | annotate | diff | comparison | revisions
--- a/net/server.lua	Sun Oct 04 15:56:55 2009 +0100
+++ b/net/server.lua	Sun Oct 04 15:58:21 2009 +0100
@@ -300,6 +300,7 @@
     local ssl
 
     local dispatch = listeners.incoming or listeners.listener
+    local status = listeners.status
     local disconnect = listeners.disconnect
 
     local bufferqueue = { }    -- buffer array
@@ -542,7 +543,7 @@
                         out_put( "server.lua: ssl handshake done" )
                         handler.readbuffer = _readbuffer    -- when handshake is done, replace the handshake function with regular functions
                         handler.sendbuffer = _sendbuffer
-                        -- return dispatch( handler )
+                        _ = status and status( handler, "ssl-handshake-complete" )
                         return true
                     else
                         out_put( "server.lua: error during ssl handshake: ", tostring(err) )

mercurial