home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rexxlb.zip
/
SAMPLES
/
SERVER.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-01-08
|
1KB
|
28 lines
/*****************************************************************************/
/* */
/* Sample named pipe server using REXXLIB. It simply echoes whatever */
/* message is sent to it. */
/* */
/* Requires REXXLIB NMPIPE functions. */
/* */
/*****************************************************************************/
pipe = '\pipe\echo'
call nmpipe_create pipe, 'm', 'm', 'w'
do i=1
call nmpipe_connect pipe
say 'Connect RC =' result
if result \= 0 then
exit
do forever
message = nmpipe_read(pipe)
if message = 'end' | message == '' then do
call nmpipe_disconnect pipe
iterate i
end
say 'Message received: "'message'"'
call nmpipe_write pipe, message
end
end