diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luasocket/samples')
8 files changed, 3 insertions, 9 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/cddb.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/cddb.lua index 883730c3a4c..49a187119f8 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/cddb.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/cddb.lua @@ -32,7 +32,7 @@ end local host = socket.dns.gethostname() local query = "%s?cmd=cddb+read+%s+%s&hello=LuaSocket+%s+LuaSocket+2.0&proto=6" local url = string.format(query, server, arg[1], arg[2], host) -local body, headers, code = http.get(url) +local body, headers, code = http.request(url) if code == 200 then local data, code, error = parse(body) diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/daytimeclnt.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/daytimeclnt.lua index 90ab39e9713..f81e37c4884 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/daytimeclnt.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/daytimeclnt.lua @@ -2,7 +2,6 @@ -- UDP sample: daytime protocol client -- LuaSocket sample files -- Author: Diego Nehab --- RCS ID: $Id: daytimeclnt.lua,v 1.11 2004/06/21 06:07:57 diego Exp $ ----------------------------------------------------------------------------- local socket = require"socket" host = host or "127.0.0.1" diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/echoclnt.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/echoclnt.lua index 038be4c239d..bb22557a0be 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/echoclnt.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/echoclnt.lua @@ -2,7 +2,6 @@ -- UDP sample: echo protocol client -- LuaSocket sample files -- Author: Diego Nehab --- RCS ID: $Id: echoclnt.lua,v 1.10 2005/01/02 22:44:00 diego Exp $ ----------------------------------------------------------------------------- local socket = require("socket") host = host or "localhost" diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/echosrvr.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/echosrvr.lua index 2697ca46d69..ea564e246d7 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/echosrvr.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/echosrvr.lua @@ -2,7 +2,6 @@ -- UDP sample: echo protocol server -- LuaSocket sample files -- Author: Diego Nehab --- RCS ID: $Id: echosrvr.lua,v 1.12 2005/11/22 08:33:29 diego Exp $ ----------------------------------------------------------------------------- local socket = require("socket") host = host or "127.0.0.1" diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/listener.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/listener.lua index 9260fbb0f35..77db2d539b7 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/listener.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/listener.lua @@ -2,7 +2,6 @@ -- TCP sample: Little program to dump lines received at a given port -- LuaSocket sample files -- Author: Diego Nehab --- RCS ID: $Id: listener.lua,v 1.11 2005/01/02 22:44:00 diego Exp $ ----------------------------------------------------------------------------- local socket = require("socket") host = host or "*" diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/lpr.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/lpr.lua index 2b059b15871..3d5e2f8d1be 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/lpr.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/lpr.lua @@ -29,7 +29,7 @@ end do local opt = {} local pat = "[%s%c%p]*([%w]*)=([\"]?[%w%s_!@#$%%^&*()<>:;]+[\"]\?\.?)" - for i = 2, table.getn(arg), 1 do + for i = 2, #arg, 1 do string.gsub(arg[i], pat, function(name, value) opt[name] = value end) end if not arg[2] then diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/talker.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/talker.lua index 607ff31989b..d5a36cbe256 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/talker.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/talker.lua @@ -2,7 +2,6 @@ -- TCP sample: Little program to send text lines to a given host/port
-- LuaSocket sample files
-- Author: Diego Nehab
--- RCS ID: $Id: talker.lua,v 1.9 2005/01/02 22:44:00 diego Exp $
-----------------------------------------------------------------------------
local socket = require("socket")
host = host or "localhost"
diff --git a/Build/source/texk/web2c/luatexdir/luasocket/samples/tinyirc.lua b/Build/source/texk/web2c/luatexdir/luasocket/samples/tinyirc.lua index f474302e0a2..5babb7e1ea1 100644 --- a/Build/source/texk/web2c/luatexdir/luasocket/samples/tinyirc.lua +++ b/Build/source/texk/web2c/luatexdir/luasocket/samples/tinyirc.lua @@ -2,7 +2,6 @@ -- Select sample: simple text line server -- LuaSocket sample files. -- Author: Diego Nehab --- RCS ID: $Id: tinyirc.lua,v 1.14 2005/11/22 08:33:29 diego Exp $ ----------------------------------------------------------------------------- local socket = require("socket") host = host or "*" @@ -32,7 +31,7 @@ function newset() insert = function(set, value) if not reverse[value] then table.insert(set, value) - reverse[value] = table.getn(set) + reverse[value] = #set end end, remove = function(set, value) |