Software /
code /
prosody
Comparison
net/server_select.lua @ 12974:ba409c67353b
net: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 16:23:12 +0100 |
parent | 12542:5ec9d6913162 |
comparison
equal
deleted
inserted
replaced
12973:cc215923297f | 12974:ba409c67353b |
---|---|
9 | 9 |
10 local use = function( what ) | 10 local use = function( what ) |
11 return _G[ what ] | 11 return _G[ what ] |
12 end | 12 end |
13 | 13 |
14 local log, table_concat = require ("util.logger").init("socket"), table.concat; | 14 local log, table_concat = require ("prosody.util.logger").init("socket"), table.concat; |
15 local out_put = function (...) return log("debug", table_concat{...}); end | 15 local out_put = function (...) return log("debug", table_concat{...}); end |
16 local out_error = function (...) return log("warn", table_concat{...}); end | 16 local out_error = function (...) return log("warn", table_concat{...}); end |
17 | 17 |
18 ----------------------------------// DECLARATION //-- | 18 ----------------------------------// DECLARATION //-- |
19 | 19 |
47 | 47 |
48 --// extern libs //-- | 48 --// extern libs //-- |
49 | 49 |
50 local luasocket = use "socket" or require "socket" | 50 local luasocket = use "socket" or require "socket" |
51 local luasocket_gettime = luasocket.gettime | 51 local luasocket_gettime = luasocket.gettime |
52 local inet = require "util.net"; | 52 local inet = require "prosody.util.net"; |
53 local inet_pton = inet.pton; | 53 local inet_pton = inet.pton; |
54 local sslconfig = require "util.sslconfig"; | 54 local sslconfig = require "prosody.util.sslconfig"; |
55 local has_luasec, tls_impl = pcall(require, "net.tls_luasec"); | 55 local has_luasec, tls_impl = pcall(require, "prosody.net.tls_luasec"); |
56 | 56 |
57 --// extern lib methods //-- | 57 --// extern lib methods //-- |
58 | 58 |
59 local socket_bind = luasocket.bind | 59 local socket_bind = luasocket.bind |
60 local socket_select = luasocket.select | 60 local socket_select = luasocket.select |