From f98977b2dac48fc66822402b095336e683715126 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 23 Mar 2022 00:09:53 +0300 Subject: Move doc→docs so we can serve it with GitHub Pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/installation.html | 127 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 docs/installation.html (limited to 'docs/installation.html') diff --git a/docs/installation.html b/docs/installation.html new file mode 100644 index 0000000..28a9fbb --- /dev/null +++ b/docs/installation.html @@ -0,0 +1,127 @@ + + + + + + +LuaSocket: Installation + + + + + + + +
+
+
+ + + +
+LuaSocket +
Network support for the Lua language +
+

+home · +download · +installation · +introduction · +reference +

+
+
+
+ + + +

Installation

+ +

Here we describe the standard distribution. If the +standard doesn't meet your needs, we refer you to the Lua +discussion list, where any question about the package scheme +will likely already have been answered.

+ +

Directory structure

+ +

On Unix systems, the standard distribution uses two base +directories, one for system dependent files, and another for system +independent files. Let's call these directories <CDIR> +and <LDIR>, respectively. +For example, in my laptp, Lua 5.1 is configured to +use '/usr/local/lib/lua/5.1' for +<CDIR> and '/usr/local/share/lua/5.1' for +<LDIR>. On Windows, <CDIR> +usually points to the directory where the Lua executable is +found, and <LDIR> points to a +lua/ directory inside <CDIR>. (These +settings can be overridden by environment variables +LUA_PATH and LUA_CPATH. See the Lua +documentation for details.) Here is the standard LuaSocket +distribution directory structure:

+ +
+<LDIR>/ltn12.lua
+<LDIR>/socket.lua
+<CDIR>/socket/core.dll
+<LDIR>/socket/http.lua
+<LDIR>/socket/tp.lua
+<LDIR>/socket/ftp.lua
+<LDIR>/socket/smtp.lua
+<LDIR>/socket/url.lua
+<LDIR>/mime.lua
+<CDIR>/mime/core.dll
+
+ +

Naturally, on Unix systems, core.dll +would be replaced by core.so. +

+ +

Using LuaSocket

+ +

With the above setup, and an interpreter with shared library support, +it should be easy to use LuaSocket. Just fire the interpreter and use the +require function to gain access to whatever module you need:

+ +
+Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
+> socket = require("socket")
+> print(socket._VERSION)
+--> LuaSocket 3.0-rc1
+
+ +

Each module loads their dependencies automatically, so you only need to +load the modules you directly depend upon:

+ +
+Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
+> http = require("socket.http")
+> print(http.request("http://www.impa.br/~diego/software/luasocket"))
+--> homepage gets dumped to terminal
+
+ + + + + + + -- cgit v1.2.3-55-g6feb From 1d61853ab84f0724502205f45849c2347d6a49ac Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Mon, 28 Mar 2022 13:53:32 +0200 Subject: chore: Update internal version references to match release (#370) --- docs/installation.html | 2 +- makefile.dist | 2 +- src/luasocket.h | 2 +- src/makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/installation.html') diff --git a/docs/installation.html b/docs/installation.html index 28a9fbb..dcf9d36 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -89,7 +89,7 @@ it should be easy to use LuaSocket. Just fire the interpreter and use the Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio > socket = require("socket") > print(socket._VERSION) ---> LuaSocket 3.0-rc1 +--> LuaSocket 3.0.0

Each module loads their dependencies automatically, so you only need to diff --git a/makefile.dist b/makefile.dist index 3a2e100..a27ba57 100644 --- a/makefile.dist +++ b/makefile.dist @@ -1,7 +1,7 @@ #-------------------------------------------------------------------------- # Distribution makefile #-------------------------------------------------------------------------- -DIST = luasocket-3.0-rc1 +DIST = luasocket-3.0.0 TEST = \ test/README \ diff --git a/src/luasocket.h b/src/luasocket.h index d22b1be..1017fba 100644 --- a/src/luasocket.h +++ b/src/luasocket.h @@ -10,7 +10,7 @@ /*-------------------------------------------------------------------------* \ * Current socket library version \*-------------------------------------------------------------------------*/ -#define LUASOCKET_VERSION "LuaSocket 3.0-rc1" +#define LUASOCKET_VERSION "LuaSocket 3.0.0" #define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab" /*-------------------------------------------------------------------------*\ diff --git a/src/makefile b/src/makefile index f95498a..06f4d19 100755 --- a/src/makefile +++ b/src/makefile @@ -272,7 +272,7 @@ SOCKET_win64=wsocket.obj # SO=$(SO_$(PLAT)) O=$(O_$(PLAT)) -SOCKET_V=3.0-rc1 +SOCKET_V=3.0.0 MIME_V=1.0.3 SOCKET_SO=socket-$(SOCKET_V).$(SO) MIME_SO=mime-$(MIME_V).$(SO) -- cgit v1.2.3-55-g6feb