Mercurial > prosody-hg
comparison net/server_select.lua @ 4983:4fd6a020d0d8
net.server_select: Remove unused variables and imports
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 22 Jul 2012 23:41:33 +0100 |
| parents | 07f478b1f7c0 |
| children | beffe931b3b6 |
comparison
equal
deleted
inserted
replaced
| 4982:07f478b1f7c0 | 4983:4fd6a020d0d8 |
|---|---|
| 17 end | 17 end |
| 18 | 18 |
| 19 local log, table_concat = require ("util.logger").init("socket"), table.concat; | 19 local log, table_concat = require ("util.logger").init("socket"), table.concat; |
| 20 local out_put = function (...) return log("debug", table_concat{...}); end | 20 local out_put = function (...) return log("debug", table_concat{...}); end |
| 21 local out_error = function (...) return log("warn", table_concat{...}); end | 21 local out_error = function (...) return log("warn", table_concat{...}); end |
| 22 local mem_free = collectgarbage | |
| 23 | 22 |
| 24 ----------------------------------// DECLARATION //-- | 23 ----------------------------------// DECLARATION //-- |
| 25 | 24 |
| 26 --// constants //-- | 25 --// constants //-- |
| 27 | 26 |
| 32 local type = use "type" | 31 local type = use "type" |
| 33 local pairs = use "pairs" | 32 local pairs = use "pairs" |
| 34 local ipairs = use "ipairs" | 33 local ipairs = use "ipairs" |
| 35 local tonumber = use "tonumber" | 34 local tonumber = use "tonumber" |
| 36 local tostring = use "tostring" | 35 local tostring = use "tostring" |
| 37 local collectgarbage = use "collectgarbage" | |
| 38 | 36 |
| 39 --// lua libs //-- | 37 --// lua libs //-- |
| 40 | 38 |
| 41 local os = use "os" | 39 local os = use "os" |
| 42 local table = use "table" | 40 local table = use "table" |
| 47 | 45 |
| 48 local os_difftime = os.difftime | 46 local os_difftime = os.difftime |
| 49 local math_min = math.min | 47 local math_min = math.min |
| 50 local math_huge = math.huge | 48 local math_huge = math.huge |
| 51 local table_concat = table.concat | 49 local table_concat = table.concat |
| 52 local table_remove = table.remove | |
| 53 local string_len = string.len | 50 local string_len = string.len |
| 54 local string_sub = string.sub | 51 local string_sub = string.sub |
| 55 local coroutine_wrap = coroutine.wrap | 52 local coroutine_wrap = coroutine.wrap |
| 56 local coroutine_yield = coroutine.yield | 53 local coroutine_yield = coroutine.yield |
| 57 | 54 |
| 65 | 62 |
| 66 local ssl_wrap = ( luasec and luasec.wrap ) | 63 local ssl_wrap = ( luasec and luasec.wrap ) |
| 67 local socket_bind = luasocket.bind | 64 local socket_bind = luasocket.bind |
| 68 local socket_sleep = luasocket.sleep | 65 local socket_sleep = luasocket.sleep |
| 69 local socket_select = luasocket.select | 66 local socket_select = luasocket.select |
| 70 local ssl_newcontext = ( luasec and luasec.newcontext ) | |
| 71 | 67 |
| 72 --// functions //-- | 68 --// functions //-- |
| 73 | 69 |
| 74 local id | 70 local id |
| 75 local loop | 71 local loop |
| 82 local wrapserver | 78 local wrapserver |
| 83 local getsettings | 79 local getsettings |
| 84 local closesocket | 80 local closesocket |
| 85 local removesocket | 81 local removesocket |
| 86 local removeserver | 82 local removeserver |
| 87 local changetimeout | |
| 88 local wrapconnection | 83 local wrapconnection |
| 89 local changesettings | 84 local changesettings |
| 90 | 85 |
| 91 --// tables //-- | 86 --// tables //-- |
| 92 | 87 |
