Linux 186-227-203-186.cprapid.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
Apache
Server IP : 186.227.203.186 & Your IP : 216.73.216.147
Domains : 154 Domain
User : pmcaxingo
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
/
usr /
share /
doc /
lua-socket /
Delete
Unzip
Name
Size
Permission
Date
Action
README
237
B
-rw-r--r--
2013-06-14 11:27
dns.html
4.6
KB
-rw-r--r--
2013-06-14 11:27
ftp.html
9.34
KB
-rw-r--r--
2013-06-14 11:27
http.html
11.18
KB
-rw-r--r--
2013-06-14 11:27
index.html
7.39
KB
-rw-r--r--
2013-06-14 11:27
installation.html
3.79
KB
-rw-r--r--
2013-06-14 11:27
introduction.html
12.14
KB
-rw-r--r--
2013-06-14 11:27
ltn12.html
10.68
KB
-rw-r--r--
2013-06-14 11:27
lua05.ppt
297
KB
-rw-r--r--
2013-06-14 11:27
luasocket.png
11.46
KB
-rw-r--r--
2013-06-14 11:27
mime.html
13.83
KB
-rw-r--r--
2013-06-14 11:27
reference.css
950
B
-rw-r--r--
2013-06-14 11:27
reference.html
7.41
KB
-rw-r--r--
2013-06-14 11:27
smtp.html
14.16
KB
-rw-r--r--
2013-06-14 11:27
socket.html
13.54
KB
-rw-r--r--
2013-06-14 11:27
tcp.html
20.96
KB
-rw-r--r--
2013-06-14 11:27
udp.html
16.52
KB
-rw-r--r--
2013-06-14 11:27
url.html
8.23
KB
-rw-r--r--
2013-06-14 11:27
Save
Rename
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta name="description" content="LuaSocket: Introduction to the core"> <meta name="keywords" content="Lua, LuaSocket, TCP, UDP, Network, Support, Installation"> <title>LuaSocket: Installation</title> <link rel="stylesheet" href="reference.css" type="text/css"> </head> <body> <!-- header +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <div class=header> <hr> <center> <table summary="LuaSocket logo"> <tr><td align=center><a href="http://www.lua.org"> <img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png"> </a></td></tr> <tr><td align=center valign=top>Network support for the Lua language </td></tr> </table> <p class=bar> <a href="index.html">home</a> · <a href="index.html#download">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> </p> </center> <hr> </div> <!-- installation ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <h2>Installation</h2> <p> 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. </p> <h3>Directory structure</h3> <p> 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 <tt><CDIR></tt> and <tt><LDIR></tt>, respectively. For example, in my laptp, Lua 5.1 is configured to use '<tt>/usr/local/lib/lua/5.1</tt>' for <tt><CDIR></tt> and '<tt>/usr/local/share/lua/5.1</tt>' for <tt><LDIR></tt>. On Windows, <tt><CDIR></tt> usually points to the directory where the Lua executable is found, and <tt><LDIR></tt> points to a <tt>lua/</tt> directory inside <tt><CDIR></tt>. (These settings can be overridden by environment variables <tt>LUA_PATH</tt> and <tt>LUA_CPATH</tt>. See the Lua documentation for details.) Here is the standard LuaSocket distribution directory structure:</p> <pre class=example> <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 </pre> <p> Naturally, on Unix systems, <tt>core.dll</tt> would be replaced by <tt>core.so</tt>. </p> <h3>Using LuaSocket</h3> <p> 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 <tt>require</tt> function to gain access to whatever module you need:</p> <pre class=example> Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio > socket = require("socket") > print(socket._VERSION) --> LuaSocket 3.0-rc1 </pre> <p> Each module loads their dependencies automatically, so you only need to load the modules you directly depend upon: </p> <pre class=example> 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 </pre> <!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <div class=footer> <hr> <center> <p class=bar> <a href="index.html">home</a> · <a href="index.html#down">download</a> · <a href="installation.html">installation</a> · <a href="introduction.html">introduction</a> · <a href="reference.html">reference</a> </p> <p> <small> Last modified by Diego Nehab on <br> Tue Jun 11 19:06:14 HKT 2013 </small> </p> </center> </div> </body> </html>