Brandy, Thanks for the info. That is very good to know. One thing that is 'busted' in AOLserver is the ability to provide threaded generic servers. I would like to build this in for various reasons, so it looks like the socket/fileevent method might be the way to go, and just forget about threads.
For those who don't know, ns_socklistencallback runs in a single thread, no matter how many times you call it with different ip/port combinations. If any client connection blocks, everyone else stacks up waiting. Last week I started working on a shared 'Network Variable' server. Not wanting to write any more C level code, I had to use ns_socklistencallback to receive an ip/port number to dial back to, and start a new thread on the listen server to dial back the client, which had setup a server using ns_socklisten. While this worked great, I ran into another issue: when a connection thread finishes with a connection it forgets about any open fds, so the connection is only available for the first connection. :( So it looks like another project will be to setup a module which allows persistent tcp connections, probably similar to nsdb, but working with arrays instead of ns_sets. tom jackson On Fri, 2004-05-28 at 09:00, Brady Wetherington wrote: > Note that tclhttpd uses "fileevent" to implement a full-fledged single-process > select-based web > server - I don't know how good it actually is in practice, but it should make for a > very high- > performance, low-overhead server. > > On Thu, 27 May 2004 12:45:09 -0700, Tom Jackson <[EMAIL PROTECTED]> wrote: > >Right, you use something like 'fileevent'. > > > >I'm going to be playing around with this a little to see how it compares > >to a server I just wrote using ns_socklistencallback. > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with > the > body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field > of your email blank. > -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
