Fine tunned modules scheme.
Adjusted client modules. Fixed proxy bug in http.
This commit is contained in:
parent
a04f15d1ca
commit
1e5e8b5ce5
16 changed files with 46 additions and 24 deletions
|
@ -4,8 +4,8 @@
|
|||
-- Author: Diego Nehab
|
||||
-- RCS ID: $Id$
|
||||
-----------------------------------------------------------------------------
|
||||
local http = require("http")
|
||||
local url = require("url")
|
||||
local http = require("socket.http")
|
||||
local url = require("socket.url")
|
||||
http.TIMEOUT = 10
|
||||
|
||||
function readfile(path)
|
||||
|
|
|
@ -8,10 +8,10 @@ function load(s)
|
|||
end
|
||||
|
||||
load("socket")
|
||||
load("url")
|
||||
load("socket.url")
|
||||
load("ltn12")
|
||||
load("mime")
|
||||
load("tp")
|
||||
load("smtp")
|
||||
load("http")
|
||||
load("ftp")
|
||||
load("socket.tp")
|
||||
load("socket.smtp")
|
||||
load("socket.http")
|
||||
load("socket.ftp")
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
-- Load required modules
|
||||
-----------------------------------------------------------------------------
|
||||
local socket = require("socket")
|
||||
local url = require("url")
|
||||
local tp = require("tp")
|
||||
local url = require("socket.url")
|
||||
local tp = require("socket.tp")
|
||||
|
||||
module("socket.dict")
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Globals
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
-- RCS ID: $Id$
|
||||
-----------------------------------------------------------------------------
|
||||
local socket = require("socket")
|
||||
local http = require("http")
|
||||
local ftp = require("ftp")
|
||||
local url = require("url")
|
||||
local http = require("socket.http")
|
||||
local ftp = require("socket.ftp")
|
||||
local url = require("socket.url")
|
||||
local ltn12 = require("ltn12")
|
||||
|
||||
-- formats a number of seconds into human readable form
|
||||
|
|
|
@ -39,7 +39,6 @@ local function connect(localhost, option)
|
|||
until localport > 731
|
||||
test(skt, err)
|
||||
else skt = test(socket.tcp()) end
|
||||
print("'" .. host .. "'")
|
||||
try(skt:connect(host, port))
|
||||
return { skt = skt, try = try }
|
||||
end
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
-----------------------------------------------------------------------------
|
||||
local socket = require("socket")
|
||||
local ltn12 = require("ltn12")
|
||||
local url = require("url")
|
||||
local url = require("socket.url")
|
||||
|
||||
module("socket.tftp")
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Program constants
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue