| 1 |
This directory contains some sample programs using |
| 2 |
LuaSocket. This code is not supported. |
| 3 |
|
| 4 |
listener.lua -- socket to stdout |
| 5 |
talker.lua -- stdin to socket |
| 6 |
|
| 7 |
listener.lua and talker.lua are about the simplest |
| 8 |
applications you can write using LuaSocket. Run |
| 9 |
|
| 10 |
'lua listener.lua' and 'lua talker.lua' |
| 11 |
|
| 12 |
on different terminals. Whatever you type on talk.lua will |
| 13 |
be printed by listen.lua. |
| 14 |
|
| 15 |
lpr.lua -- lpr client |
| 16 |
|
| 17 |
This is a cool program written by David Burgess to print |
| 18 |
files using the Line Printer Daemon protocol, widely used in |
| 19 |
Unix machines. It uses the lp.lua implementation, in the |
| 20 |
etc directory. Just run 'lua lpr.lua <filename> |
| 21 |
queue=<printername>' and the file will print! |
| 22 |
|
| 23 |
cddb.lua -- CDDB client |
| 24 |
|
| 25 |
This is the first try on a simple CDDB client. Not really |
| 26 |
useful, but one day it might become a module. |
| 27 |
|
| 28 |
daytimeclnt.lua -- day time client |
| 29 |
|
| 30 |
Just run the program to retrieve the hour and date in |
| 31 |
readable form from any server running an UDP daytime daemon. |
| 32 |
|
| 33 |
echoclnt.lua -- UDP echo client |
| 34 |
echosrvr.lua -- UDP echo server |
| 35 |
|
| 36 |
These are a UDP echo client/server pair. They work with |
| 37 |
other client and servers as well. |
| 38 |
|
| 39 |
tinyirc.lua -- irc like broadcast server |
| 40 |
|
| 41 |
This is a simple server that waits simultaneously on two |
| 42 |
server sockets for telnet connections. Everything it |
| 43 |
receives from the telnet clients is broadcasted to every |
| 44 |
other connected client. It tests the select function and |
| 45 |
shows how to create a simple server whith LuaSocket. Just |
| 46 |
run tinyirc.lua and then open as many telnet connections |
| 47 |
as you want to ports 8080 and 8081. |
| 48 |
|
| 49 |
Good luck, |
| 50 |
Diego. |