[plt-scheme] bsd sockets package
Alright, here is the first version of my sockets package:
http://web.media.mit.edu/~vyzo/var/mzsocket-20070320.tar.gz
I have only tested on GNU (sorry I don't have any non-GNU machines handy)
and it is completely lacking in documentation.
A couple of examples in socket/examples/
urlget: fetches a url
for instance: urlget http://www.google.com
echosrv: runs an echo server. Can do tcp and unix stream sockets.
echocli: runs an echo client, reads from stdin, writes to stdout.
For instance: echosrv -tcp 5000
and you can telnet to it in port 5000 or run echocli:
telnet localhost 5000
or
./echocli -tcp 5000
for unix sockets:
./echosrv -unix /tmp/blah&
./echocli -unix /tmp/blah
I would appreciate if you can test it in different platforms - it may
need some minor tweaking to get it to compile. Let me know if you run
into any problems (patches welcome).
I will make a package for planet once I have written some docs and
prepared a test suite.
-- vyzo
PS: Quite obviously, unix domain sockets are not supported on
windoze. Neither are sendmsg/recvmsg, so raw sockets are pretty
useless there. It should be possible to emulate them with
WSASendMsg/WSARecvMsg nonetheless.