On 2006.08.25, Rusty Brooks <[EMAIL PROTECTED]> wrote:
> The deal is, I need to open a connection to a port on the same machine, 
> or another machine, and send commands back and forth.  That part is easy 
> enough.
> 
> The connection needs to be persistent though, and ideally I would open 
> one connection that all threads in the server could use.

I would suggest upgrading to AOLserver 4.5.0 and looking at the newly
introduce nsproxy module.  I'd create a proxy pool of size 1 and
establish the network connection in the proxy.  Then, code running in
the server can grab the (one) handle to the proxy and use the socket
then release the handle, but as long as you don't kill/restart the
proxy, the connection will stay connected in the proxy.

There's a reason why everyone should be happy to upgrade to AOLserver
4.5.0, the nsproxy module makes it so worth it.  :-)

Rusty, I'd be happy to help you write the code for the implementation of
this if you're willing to allow the code to be released with the
AOLserver license and used as an example for everyone else.  Just let me
know if you're interested.

-- Dossy

-- 
Dossy Shiobara              | [EMAIL PROTECTED] | http://dossy.org/
Panoptic Computer Network   | http://panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


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