[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using multiple sockets

Hello list,

I noticed that the SRFI 106 draft does not mention any way of using
multiple sockets. Let's take a concrete example: an IRC server. The
server must be able to wait for new incoming connections and at the same
time wait for already connected clients to send commands. A good quality
IRC server also needs a non-blocking DNS resolver, so that it can look
up the hostnames of new clients. It will also try to connect to the
"ident" port of new clients, so it needs a non-blocking way to establish
new connections.

One way to write a server like this is by using threads or something
similar. Another way is to base it around non-blocking I/O and something
equivalent to the select() call from Unix, but this then needs to be
integrated with a DNS resolver library.

How would you suggest that SRFI 106 be used to write an IRC server?
Perhaps an IRC server seems a little too complicated for this SRFI, if
it aims to be simple. But most servers will need some aspect of what I
have described.


GÃran Weinholt <goran@xxxxxxxxxxx>
"You never give me your money, you only give me your funny paper."
  -- The Beatles