Software /
code /
prosody
Comparison
main.lua @ 65:9c471840acb9 tls
TLS: Handshake works, no data after that
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Oct 2008 17:33:38 +0100 |
parent | 53:14ea0fe6ca86 |
child | 97:c3f12fd0c823 |
comparison
equal
deleted
inserted
replaced
64:bcd0a3975580 | 65:9c471840acb9 |
---|---|
99 | 99 |
100 | 100 |
101 local protected_handler = function (conn, data, err) local success, ret = pcall(handler, conn, data, err); if not success then print("ERROR on "..tostring(conn)..": "..ret); conn:close(); end end; | 101 local protected_handler = function (conn, data, err) local success, ret = pcall(handler, conn, data, err); if not success then print("ERROR on "..tostring(conn)..": "..ret); conn:close(); end end; |
102 local protected_disconnect = function (conn, err) local success, ret = pcall(disconnect, conn, err); if not success then print("ERROR on "..tostring(conn).." disconnect: "..ret); conn:close(); end end; | 102 local protected_disconnect = function (conn, err) local success, ret = pcall(disconnect, conn, err); if not success then print("ERROR on "..tostring(conn).." disconnect: "..ret); conn:close(); end end; |
103 | 103 |
104 server.add( { listener = protected_handler, disconnect = protected_disconnect }, 5222, "*", 1, nil ) -- server.add will send a status message | 104 server.add( { listener = protected_handler, disconnect = protected_disconnect }, 5222, "*", 1, ssl_ctx ) -- server.add will send a status message |
105 server.add( { listener = protected_handler, disconnect = protected_disconnect }, 5223, "*", 1, ssl_ctx ) -- server.add will send a status message | 105 --server.add( { listener = protected_handler, disconnect = protected_disconnect }, 5223, "*", 1, ssl_ctx ) -- server.add will send a status message |
106 | 106 |
107 server.loop(); | 107 server.loop(); |