VMSPerl, I've writen numerous client/server routines using IO::Socket and IO::Socket::INET to communicate between VMS and other platforms with great success. Recently, I decided to look into creating a TCPIP Services "Auxliary Service" using
TCPIP> SET SERVICE x /port=x /proc=xfer /prot=tcp /file=x.com /user=xfer /log_opt with the desired custom settings for my site. I am attempting to create a service that is only run when needed, rather than using a detached or batch process. Normally, the server is created first via $listener = IO::Socket::INET->new(...) and I use $listener = IO::Socket::INET->select(...) for multithreading. I wrap the perl into an X.COM command file using the syntax: $ gosub go_perl ... $go_perl: $ perl -x SYS$INPUT $ deck /dollar="__END__" #! perl ... __END__ So, far so good. The client creates a ->new(...) socket to the specified port, then the two routines sysread adn syswrite back and forth. Everything is fine. Now, I want to take that same server routine X.COM and use it as an auxilary service, so it is only called when the port is accessed. I can then log all events and close the socket after the client is done. The problem: The client initiates the server, rather than having the server running. Say I using port 2332 as the service port. When the client attempts to create a new socket to that port the TCPIP auxilary service see the connection and starts the X.COM process. However, the X.COM can't create a socket port on 2332 because it is already assigned to the auxiliary service. Work around: It appears that I need to ports, one that initiates the X.COM process and a separate port the gets created by the X.COM perl code and waits for the client code to connect. Therefore, the client would need to first create a socket for the service to initialize, then create a separate service to communicate with the server -- say on port 2333. Has anyone attempted to design a similar configuration. I'm not sure if I'm overlooking an obvious solution. Donald G Plugge System Manager NIH/NCI/EIB Flow Cytometry (301)435-6429
