Software /
code /
prosody
Comparison
net/server_event.lua @ 3149:5aca2f01c0f9
net.server_event: Also return the socket from wrapclient, to maintain compatibility with server_select (thanks uhoreg)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 02 Jun 2010 21:33:44 +0100 |
parent | 3003:48871a549b4c |
child | 3237:721a83a3beb9 |
comparison
equal
deleted
inserted
replaced
3125:f2d1079a758d | 3149:5aca2f01c0f9 |
---|---|
748 local addclient, wrapclient | 748 local addclient, wrapclient |
749 do | 749 do |
750 function wrapclient( client, ip, port, listeners, pattern, sslctx, startssl ) | 750 function wrapclient( client, ip, port, listeners, pattern, sslctx, startssl ) |
751 local interface = handleclient( client, ip, port, nil, pattern, listeners, sslctx ) | 751 local interface = handleclient( client, ip, port, nil, pattern, listeners, sslctx ) |
752 interface:_start_session() | 752 interface:_start_session() |
753 return interface | 753 return interface, client |
754 --function handleclient( client, ip, port, server, pattern, listener, _, sslctx ) -- creates an client interface | 754 --function handleclient( client, ip, port, server, pattern, listener, _, sslctx ) -- creates an client interface |
755 end | 755 end |
756 | 756 |
757 function addclient( addr, serverport, listener, pattern, localaddr, localport, sslcfg, startssl ) | 757 function addclient( addr, serverport, listener, pattern, localaddr, localport, sslcfg, startssl ) |
758 local client, err = socket.tcp() -- creating new socket | 758 local client, err = socket.tcp() -- creating new socket |