README 1.7 KB

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