Mark and Paul,
Thanks for the responses.
Actually...about that N-Class...I've got one! :-)
But, the server I'm writing is actually running on a 989/400 and
response isn't bad at all when I run the server as a stand alone
(not in INETD).
I'm fiddling with inetd still, more to see if I can make it work than
anything else.
So far, I've successfully used STDIN as incoming from the socket, but I'm
having trouble writing output back to the socket. I'd tried opening the
STDIN in as follows:
open(SOCK, "+<-"); #which, if I've thought this out right,
#should open STDIN (assigned to fh
"SOCK"
#in read/write mode w/o clobbering
it.
A flag, however, is that while STDIN does produce the input from the client
correctly (while in INETD), if I test STDIN with "-S" as follows:
die "STDIN is not a socket" unless -S STDIN;
The server always dies. Is the failed test related to the fcntl() call
against a socket problem?
Ron Wuerth
Virginia International Terminals, Inc.
-----Original Message-----
From: Mark Bixby [mailto:[log in to unmask]]
Sent: Monday, October 08, 2001 4:29 PM
To: [log in to unmask]
Subject: Re: [HP3000-L] MPE & Sockets & Perl ... oh my!
There's no reason when you couldn't run a Perl script as an INETD service,
but
I suspect you wouldn't want to due to the high overhead of spawning the Perl
interpreter process for each new incoming connection.
Of course you could probably make it run pretty fast by upgrading to an
N-Class. ;-)
- Mark B.
"PAUL,GUY (HP-Boise,ex1)" wrote:
>
> Ron,
>
> If you want the server code to run under JINETD I believe you would have
to
> write a C pgm to do this. Lars has an example that will give you an idea
of
> how that works.
> http://www.editcorp.com/Personal/Lars_Appel/SockSamp/example3.txt
>
> -Guy
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|