diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-11-20 08:56:19 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-11-20 08:56:19 +0000 |
commit | 5e09779c7f6b1710150d5a0f12d86ded7ede75c6 (patch) | |
tree | ffd2e2e7d918cc30015c89bd14122aa8cadb1546 /samples/README | |
parent | f20f4889bfe5a02cd9b77868b90cc8042352176a (diff) | |
download | luasocket-5e09779c7f6b1710150d5a0f12d86ded7ede75c6.tar.gz luasocket-5e09779c7f6b1710150d5a0f12d86ded7ede75c6.tar.bz2 luasocket-5e09779c7f6b1710150d5a0f12d86ded7ede75c6.zip |
In pre release mode!
Diffstat (limited to 'samples/README')
-rw-r--r-- | samples/README | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/samples/README b/samples/README index 0100a4a..e63a6f5 100644 --- a/samples/README +++ b/samples/README | |||
@@ -1,59 +1,50 @@ | |||
1 | This directory contains some sample programs using LuaSocket. This code | 1 | This directory contains some sample programs using |
2 | is not supported. | 2 | LuaSocket. This code is not supported. |
3 | 3 | ||
4 | listener.lua -- socket to stdout | 4 | listener.lua -- socket to stdout |
5 | talker.lua -- stdin to socket | 5 | talker.lua -- stdin to socket |
6 | 6 | ||
7 | listener.lua and talker.lua are about the simplest applications you can | 7 | listener.lua and talker.lua are about the simplest |
8 | write using LuaSocket. Run | 8 | applications you can write using LuaSocket. Run |
9 | 9 | ||
10 | 'lua listener.lua' and 'lua talker.lua' | 10 | 'lua listener.lua' and 'lua talker.lua' |
11 | 11 | ||
12 | on different terminals. Whatever you type on talk.lua will be | 12 | on different terminals. Whatever you type on talk.lua will |
13 | printed by listen.lua. | 13 | be printed by listen.lua. |
14 | |||
15 | b64.lua | ||
16 | qp.lua | ||
17 | eol.lua | ||
18 | |||
19 | These are tiny programs that perform Base64, Quoted-Printable and | ||
20 | end-of-line marker conversions. | ||
21 | 14 | ||
22 | lpr.lua -- lpr client | 15 | lpr.lua -- lpr client |
23 | 16 | ||
24 | This is a cool program written by David Burgess to print files using the | 17 | This is a cool program written by David Burgess to print |
25 | Line Printer Daemon protocol, widely used in Unix machines. It uses the | 18 | files using the Line Printer Daemon protocol, widely used in |
26 | lp.lua implementation, in the etc directory. Just run | 19 | Unix machines. It uses the lp.lua implementation, in the |
27 | 'lua lpr.lua <filename> queue=<printername>' and the file will print! | 20 | etc directory. Just run 'lua lpr.lua <filename> |
21 | queue=<printername>' and the file will print! | ||
28 | 22 | ||
29 | cddb.lua -- CDDB client | 23 | cddb.lua -- CDDB client |
30 | 24 | ||
31 | This is the first try on a simple CDDB client. Not really useful, but one | 25 | This is the first try on a simple CDDB client. Not really |
32 | day it might become a module. | 26 | useful, but one day it might become a module. |
33 | 27 | ||
34 | daytimeclnt.lua -- day time client | 28 | daytimeclnt.lua -- day time client |
35 | 29 | ||
36 | Just run the program to retrieve the hour and date in readable form from | 30 | Just run the program to retrieve the hour and date in |
37 | any server running an UDP daytime daemon. | 31 | readable form from any server running an UDP daytime daemon. |
38 | 32 | ||
39 | echoclnt.lua -- UDP echo client | 33 | echoclnt.lua -- UDP echo client |
40 | echosrvr.lua -- UDP echo server | 34 | echosrvr.lua -- UDP echo server |
41 | 35 | ||
42 | These are a UDP echo client/server pair. They work with other client and | 36 | These are a UDP echo client/server pair. They work with |
43 | servers as well. | 37 | other client and servers as well. |
44 | 38 | ||
45 | tinyirc.lua -- irc like broadcast server | 39 | tinyirc.lua -- irc like broadcast server |
46 | 40 | ||
47 | This is a simple server that waits simultaneously on two server sockets | 41 | This is a simple server that waits simultaneously on two |
48 | for telnet connections. Everything it receives from the telnet clients | 42 | server sockets for telnet connections. Everything it |
49 | is broadcasted to every other connected client. It tests the select | 43 | receives from the telnet clients is broadcasted to every |
50 | function and shows how to create a simple server whith LuaSocket. Just | 44 | other connected client. It tests the select function and |
51 | run tinyirc.lua and then open as many telnet connections as you want | 45 | shows how to create a simple server whith LuaSocket. Just |
52 | to ports 8080 and 8081. | 46 | run tinyirc.lua and then open as many telnet connections |
53 | 47 | as you want to ports 8080 and 8081. | |
54 | check-memory.lua -- checks memory consumption | ||
55 | |||
56 | This is just to see how much memory each module uses. | ||
57 | 48 | ||
58 | Good luck, | 49 | Good luck, |
59 | Diego. | 50 | Diego. |