Email list hosting service & mailing list manager

Using multiple sockets Göran Weinholt (10 Oct 2012 10:56 UTC)
Re: Using multiple sockets Takashi Kato (10 Oct 2012 18:28 UTC)

Using multiple sockets Göran Weinholt 10 Oct 2012 10:33 UTC

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.

Regards,

--
Göran Weinholt <xxxxxx@weinholt.se>
"You never give me your money, you only give me your funny paper."
  -- The Beatles