I'd like to keep a permanently connected socket connection to another machine, with each aolserver thread having a socket that is already connected to that other app.

I tried using the namespace trick to keep a global around, like so:

namespace eval sbuff {}
proc mysockget {} {
    global sbuff:mysock
    if {[info exists mysock] == 1} {
        return $mysock
    }
    set mysock [socket localhost 9999]
}

but while the socket descriptor stays around with this trick, aolserver automatically closes the socket itself. This must be some sort of cleanup code in aolserver, normally a good thing.

Is there a way to either:
1) have my socket NOT be cleaned up by aolserver
2) have a connected socket pool, like nsdb, but w/o any functionality other than a connected socket

I'm not alone with this need, I know that Rusty needs to do this too, and lots of tcpip socket protocols have login steps, that cause a new- connection-per-adp-page strategy to be inefficient.

-john


--
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.

Reply via email to