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 -p
JXTA>inpipe = mkpipe -i pipeadv
JXTA>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.
Get JXTA in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.