Re: Trivial Sockets
Sven Van Caekenberghe <sven@beta9.be> writes:
> Yesterday, I contributed a LispWorks implementation to Daniel Barlow's
> Trivial Sockets project,
> a thin compatibility layer for simple client and server socket use.
>
> You can read more about it here: http://www.cliki.net/trivial-sockets
>
> The LispWorks implementation has the following limitations (quoted
> from the manual):
>
> LispWorks supports TCP only, It doesn't do
> non-default local address in server sockets, or listen backlog length.
> It doesn't do non-default external-formats. If the local port is 0,
> open-server doesn't return the real port number. It also uses
> an odd construction involving multiple threads for server sockets
> which in principle should be transparent but don't say we didn't warn
> you.
>
> I tried to use only features documented in the manuals, because I
> wanted the implementation to work on all LispWorks platforms, not just
> on Mac OS X. But I noticed that there are more arguments to some of
> the comm functions than are documented, and I know from this mailing
> list and other projects that even more *is* possible in LispWorks.
>
> If anyone is interested in this project and/or wants to make sure that
> there is a good LispWorks implementation, please feel free to look at
> the code and suggest improvements.
The acl-compat code which comes with portable-aserve works around many
of the limitations in the Lispworks public interface. The file to
look at is "portableaserve/acl-compat/lispworks/acl-socket.lisp".
For example, I wanted to try to open a server socket on a particular
port, and then try another if the address was already in use. This
was difficult to achieve using the Lispworks public interface, but
easy using 'make-socket', available in acl-compat.
Unfortunately, I do not have the enthusiasm to actually write the
necessary compatibility code for "Trivial Sockets", which seems to be
the third portable socket interface, after acl-compat and clocc.
Why are these two libraries insufficient?
-russ