[plt-scheme] UDP/Datagrams

From: Eduardo Cavazos (proteus at theworld.com)
Date: Fri Nov 15 00:29:23 EST 2002

Hi all,

Has anyone out there taken a stab at adding UDP/Datagram style network
functions to MzScheme? If you'd be willing to share what you have, please
contact me.

I'm not a network programming expert, but I figure that adding proper
support across Win32, Mac OS, and UNIX would be a fair amount of work.
Currently I'm just interested in support on UNIX (RedHat Linux in
particular), so if you have something that's UNIX specific, that would be

The motivation here is better DNS interoperability. MzScheme has a DNS
resolver library, and for most people, with the common case, it works
great. That is, most people point the PLT resolver at a local nameserver
provided by their organizations' system administrators. This nameserver is
usually very friendly to resolvers within the organization; specifically,
they often support recursion and will perform the recursive search on
behalf of the client, and they accept both UDP and TCP style queries.
However, if you (for whatever strange reason) point your resolver at the
root nameservers (nameservers authoritative for the "." domain) and let
the PLT resolver perform the recursive query itself, sometimes you will
run into nameservers which apparently only speak UDP, and so the query
times out. So, the way to fix this problem would be to have the resolver
attempt the queries using UDP first, and then resort to TCP only if the
DNS message is too long for the datagram. This behaviour is what the RFC

Again, this limitation is pretty minor since the existing resolver usually
works just fine, and it may be of interest to only myself only. If
MzScheme did speak UDP however, we could have a nice PLT DNS server to go
along with the web server :-). Is that perverted or what?


P.S. Nice presentation at LL2 Matthew! Folks on the list: you can check
out the webcast at: http://ll2.ai.mit.edu/

Posted on the users mailing list.