HP3000-L Archives

July 1996, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Duane Percox <[log in to unmask]>
Reply To:
Duane Percox <[log in to unmask]>
Date:
Tue, 23 Jul 1996 17:56:02 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
I see lots of references to 'my listener' and 'my server' and from the
early socket shareware I formulated a general plan of: "you have your
listener and you have your server". Now, I expanded on that somewhat
by writing a general purpose listener, but the split personality
still remains.
 
Recently I needed to write a server which would be a small utility
and I didn't want to have to use a separate listener. So I did the following
which might be of interest to others (or I'm just the last one to figure it
out!):
 
I made my server a listener also. I set it up so when the server is run with
a specific ;parm= it runs as a listener. When run in this mode it uses the
PROCINFO intrinsic to determine its file name.
 
Then when I create my son server processes I automatically know the name. So
I don't have to care where the program was installed, don't have to edit any
jcl, etc, etc. Of course when I create the son server process I set ;parm=
to a value that indicates 'server' mode and do server type things.
 
Makes for a very clean listener/server pair.
 
Duane Percox  (QSS)
[log in to unmask] (v:415.306.1608 f:415.365.2706)
http://www.aimnet.com/~qssnet/
 ftp://ftp.aimnet.com/pub/users/qssnet/
Don't miss the 'Land of QWEBS'... http://qwebs.qss.com

ATOM RSS1 RSS2