[usocket-devel] Support for Server Connections

Erik Huelsmann e.huelsmann at gmx.net
Mon Oct 16 20:19:47 UTC 2006


> I'd like to see support for server connections in usocket soon. Is any
> work being done at the moment in this direction? If not, I'd be happy
> to work on it.

That's great to hear.

I am working on it, but at large intervals, meaning I need to restart every time (which is too bad and prohibiting progress).

I have several problems with creating server sockets:

1. I need tests, but how do we test the server side given a number of
   restrictions on many systems:
   * firewalls
   * threaded as well as non-threaded lisps
   * non-cross platform running of external programs

2. I am trying to find out the common elements in the different interfaces
   provided at the moment by the currently supported lisp variants.
   ABCL isn't the norm there: I have in the past successfully submitted
   patches which implemented behaviours I needed to support a minimal
   client interface.
   Franz says they can't give me more than the current external interface
   because not all platforms they support have BSD sockets...
   So... That's where I left off, thinking I need an interface not
   necessarily restricted to IP sockets. That wasn't the complex part :-)

   These requirements came up:
    - Support for other-than-ipv4 addresses/sockets
    - Support for create-time options (such as REUSEADDRESS)

   And it got complex when I got myself mixed up with sockets listening
   for a stream connection and sockets listening for datagrams.
   I think those shouldn't go through the same interface, but that's
   where I did get stuck.

So, with respect to (1), we could write a script which starts 2 sbcl instances; one as the client, the other as the server. After finishing the server, the script can kill the client. Or we could even implement the client in a different language (in which we could implement the starting script too: python comes to mind here).

With respect to (2), I'd like to create 2 interfaces, I think something like this:

 (defun create-datagram-socket (<parameters>) <implementation>)

and

 (defun create-stream-serving-socket (<parameters>) <implementation>)

Where I think the latter could be defined as

(defun create-stream-serving-socket (options &rest address)
  ...)

It's not completely compatible with 'socket-connect', but we can change that right before 1.0.

What were your ideas?

Thanks for offering to help out! I hope we can work out the server side RSN (Real Soon Now).

bye,


Erik.
-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl



More information about the usocket-devel mailing list