Aria Bamdad <[EMAIL PROTECTED]> wrote : > I have been using the following code segment in a CGI I have for years. > It send a message to another DVM and waits for a reply. I know you didn't > want an PIPE stage but in case you changed your mind. I am no pipe expect > so I am sure it can be written much nicer but it works!
> Aria > address command 'CP SET MSG IUCV' > ADDRESS COMMAND 'PIPE (end ? name SendRequest)', > ' hole', > '| literal +5', /* wait max of 5 sec */ > '| delay', > '| g: gate', /* Shut the gate */ > '? starmsg *MSGALL', /* wait for messages */ > '| g:', /* Until the interval expires */ > '| specs w2-* 1', /* remove the id part. */ > '| var reply', > '| pipestop', /* stop when we got a reply */ > '? hole', /* ask DVM in 1 sec. to be sure we are listening */ > '| literal SMSG _dvmid_ _dvmCommand_' , > '| CP', /* send message to DVM */ > '| hole' Aria, Thanks, I have nothing against using a PIPE - I use them all the time. This is very much what I was thinking about when I mentioned waiting on a STARMSG and, if there is nothing else, it is probably what I will use (with some modification to detect the end of the stream of reply messages). I have a number of servers that work with very similar code. Ideally, I was looking for something that was actually synchronous - as opposed to waiting for asynchronous messages and collecting them. However, beggars can't be choosers ;-) Colin Allinson Amadeus Data Processing GmbH
