Software / code / prosody
Comparison
net/server.lua @ 581:23b9cd1206ba
Remove old commented code from server.lua
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 06 Dec 2008 23:12:46 +0000 |
| parent | 567:ae7f6167d780 |
| child | 620:9f9f69d67edb |
comparison
equal
deleted
inserted
replaced
| 580:9ff2c3c87065 | 581:23b9cd1206ba |
|---|---|
| 796 end | 796 end |
| 797 | 797 |
| 798 loop = function( ) -- this is the main loop of the program | 798 loop = function( ) -- this is the main loop of the program |
| 799 --signal_set( "hub", "run" ) | 799 --signal_set( "hub", "run" ) |
| 800 repeat | 800 repeat |
| 801 --[[print(readlen, writelen) | |
| 802 for _, s in ipairs(readlist) do print("R:", tostring(s)) end | |
| 803 for _, s in ipairs(writelist) do print("W:", tostring(s)) end | |
| 804 out_put("select()"..os.time())]] | |
| 805 local read, write, err = socket_select( readlist, writelist, 1 ) -- 1 sec timeout, nice for timers | 801 local read, write, err = socket_select( readlist, writelist, 1 ) -- 1 sec timeout, nice for timers |
| 806 for i, socket in ipairs( write ) do -- send data waiting in writequeues | 802 for i, socket in ipairs( write ) do -- send data waiting in writequeues |
| 807 local handler = socketlist[ socket ] | 803 local handler = socketlist[ socket ] |
| 808 if handler then | 804 if handler then |
| 809 handler.dispatchdata( ) | 805 handler.dispatchdata( ) |