socket support for lua
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.5 KiB

This directory contains examples for lsocket. These are:

testsrv_tcp.lua a very simple tcp test server, just echoes what it
gets from the clients.
Start with argument 6 to use IPv6, otherwise use IPv4
testclt_tcp.lua a client for testsrv_tcp.lua, sends what you type to
the server and displays the response.
Start with argument 6 to use IPv6, otherwise use IPv4
testsrv_udp.lua like testsrv_tcp.lua, just for udp
testclt_udp.lua like testclnt_tcp.lua, just for udp
testsrv_mcast.lua a very simple multicast server, sends a counter.
Start with argument 6 to use IPv6 multicast, otherwise
use IPv4 broadcast
testclt_mcast.lua a very simple multicast client, displays what it
receives from the server.
Start with argument 6 to use IPv6 multicast, otherwise
use IPv4 broadcast

httpserver.lua a very simple http server, uses the rshttpd.lua library
to do the real work.
rshttpd.lua a ridiculously simple http server library. Documentation
is in the comment at the beginning.

httpclient.lua a simple http client. Call with the complete url you
want to fetch, httpclient.lua then issues a GET request
to the server at the specified address and prints the
data it receives to the standard output.