> I suppose another way of describing this is that in XMENU from CA there > is a SMSG option. > You put up the screen/menu with the SMSG option - if someone(server) > sends you an SMSG you wakeup and can take action. > > I am looking for a way to do this with VSCREEN.
If you can tolerate the client idle waiting for a response, then have the client code open one TCP socket to the server for use in transferring data and a second UDP socket as a signaling mechanism. Do a read from the UDP socket when you want to wait for a response. The read will block if there is no data available, and will wait until something arrives, and then return. You can send your data on the first TCP socket, and just use the second socket as a "data set ready" indicator (to borrow a term from serial I/O), omitting the message and wakeup components entirely. When you want to wake up the client, send a single UDP (or use TCP if you want to be paranoid) packet from the server, and the client will wake up from the blocking read and go on. You can then process and/or discard the "DSR" packet as you wish, and read the real data from the other socket. Of course in a pure REXX program, that implies the client comes to a complete halt on the blocking read. If it's a pipes app, then (I think) you block only on the thread that is doing the blocking read.