Re: Network

From: Brian Gray (mandy@NETCOM.COM)
Date: 08/27/97


On Wed, 27 Aug 1997, Franco wrote:

>   While rewriting the Circle code base in C++, I came upon some
> questions. Is the socket-bind-listen-nonblock-select-accept still the
> best way to allow non-blocking tcp/ip sockets under unix and it's
> sub OSes?

I don't know about the BEST way.  It's definitely the easiest way that
performs decently.  Select() is marginally better than poll().  There are
many good arguments however to using SIGIO.  In general, it is a lot
faster for up to about 25 connections, about the same up to 100, and
worse after that because of the need to use select() anyway to find out
which socket triggered the signal.  Your figures may vary based on the
specifics of your system.

I'm currently looking into the possibility of using pseudo terminals, but
I haven't gotten very far in that.  If you're in C++, I would highly
recommend the Socket++ library.  It makes things a lot more intuitive,
and it's free  :)

 -- Brian


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST