Name
recv — Receives a message from a pipe
Synopsis
recv [-t timeout] input pipe
Description
recv
receives a message from an input pipe.
A time-out in seconds can be given; if no time-out is given, the call
will block until a message is received. A time-out of
0 will block indefinitely.
The
message received from the recv command should be
stored in an environment variable. If a time-out occurred, then no
value is returned, and the environment variable is not created.
Otherwise, the environment variable contains the message sent from
the connected output pipe.
Example
JXTA>pipeadv = mkadv -pJXTA>inpipe = mkpipe -i pipeadvJXTA>msg = recv inpipe
This example creates a pipe advertisement
(pipeadv), creates an input pipe
(inpipe), and receives a message
(msg) over that pipe. The recv
command will block until a message is received.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access