Hi there,

I have a task I need to try to do in AOLServer which is not working out so well so far.

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. If that's not possible, then each thread having it's own, persistent connection would be OK. As it is now, when a connection is finished, the open file handles are all closed so the next use of the thread requires the connection to be opened again.

The requirements here are not dis-similar to how database connections work in aolserver: I'd like bits of code to be able to "grab" a handle to the server, send a command, get a response, and then release it back into the pool. I seem to recall that AOLServer used to support (maybe still does?) writing "external" database drivers but I can't find much info on it now other than cryptic remarks in the current AOLServer docs. This would be kind of a kludge but it might work.
I guess I could probably write an "internal" driver also in C

Other than that I suppose I could look at ns_db and how it's written and see if I could write something like it. I don't mind writing my interaction with the server in question in C if need be. I'm not entirely sure how threads work with C modules. Let's say I have my module open a socket (not a tcl-socket mind you, just a normal C network socket) to the server. Would any thread be able to access this socket? That is, do AOLServer modules share global variables or is it per-thread?

OK I know I've thrown a lot of stuff out there. I'm looking for any and all approaches to the problem. If it's not clear what I'm after I'd be happy to clarify.

Rusty


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