Sockets and Multiple-connection servers

Derrick Coetzee dc at moonflare.com
Mon Mar 11 22:12:17 UTC 2002


Somewhat a newbie question, somewhat a design question... is there any
easy way to simply open a server on a port and have it return a Socket
object for each new connection, each of which can be then be passed on
to a separate thread for handling as it continues to wait for new
connections (similar to popular models in Java or MFC Sockets)? Is
there a good reason not to use this model?

I'm not terribly fond of the server-is-either-connected-or-isn't,
one-client idea that seems to be used in the Socket class, just
because I think it's not (or no longer) what most servers do. Unless
I'm misunderstanding how it works, in which case I'd much appreciate
being flamed and corrected. :-)

-- 
Derrick Coetzee




More information about the Squeak-dev mailing list