README 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. This directory contains code that is more useful than the
  2. samples. This code *is* supported.
  3. tftp.lua -- Trivial FTP client
  4. This module implements file retrieval by the TFTP protocol.
  5. Its main use was to test the UDP code, but since someone
  6. found it usefull, I turned it into a module that is almost
  7. official (no uploads, yet).
  8. dict.lua -- Dict client
  9. The dict.lua module started with a cool simple client
  10. for the DICT protocol, written by Luiz Henrique Figueiredo.
  11. This new version has been converted into a library, similar
  12. to the HTTP and FTP libraries, that can be used from within
  13. any luasocket application. Take a look on the source code
  14. and you will be able to figure out how to use it.
  15. lp.lua -- LPD client library
  16. The lp.lua module implements the client part of the Line
  17. Printer Daemon protocol, used to print files on Unix
  18. machines. It is courtesy of David Burgess! See the source
  19. code and the lpr.lua in the examples directory.
  20. b64.lua
  21. qp.lua
  22. eol.lua
  23. These are tiny programs that perform Base64,
  24. Quoted-Printable and end-of-line marker conversions.
  25. get.lua -- file retriever
  26. This little program is a client that uses the FTP and
  27. HTTP code to implement a command line file graber. Just
  28. run
  29. lua get.lua <remote-file> [<local-file>]
  30. to download a remote file (either ftp:// or http://) to
  31. the specified local file. The program also prints the
  32. download throughput, elapsed time, bytes already downloaded
  33. etc during download.
  34. check-memory.lua -- checks memory consumption
  35. This is just to see how much memory each module uses.
  36. dispatch.lua -- coroutine based dispatcher
  37. This is a first try at a coroutine based non-blocking
  38. dispatcher for LuaSocket. Take a look at 'check-links.lua'
  39. and at 'forward.lua' to see how to use it.
  40. check-links.lua -- HTML link checker program
  41. This little program scans a HTML file and checks for broken
  42. links. It is similar to check-links.pl by Jamie Zawinski,
  43. but uses all facilities of the LuaSocket library and the Lua
  44. language. It has not been thoroughly tested, but it should
  45. work. Just run
  46. lua check-links.lua [-n] {<url>} > output
  47. and open the result to see a list of broken links. Make sure
  48. you check the '-n' switch. It runs in non-blocking mode,
  49. using coroutines, and is MUCH faster!
  50. forward.lua -- coroutine based forward server
  51. This is a forward server that can accept several connections
  52. and transfers simultaneously using non-blocking I/O and the
  53. coroutine-based dispatcher. You can run, for example
  54. lua forward.lua 8080:proxy.com:3128
  55. to redirect all local conections to port 8080 to the host
  56. 'proxy.com' at port 3128.
  57. unix.c and unix.h
  58. This is an implementation of Unix local domain sockets and
  59. demonstrates how to extend LuaSocket with a new type of
  60. transport. It has been tested on Linux and on Mac OS X.
  61. Good luck,
  62. Diego.