Name
mkpipe — Creates a pipe
Synopsis
mkpipe -i|o pipe advertisement
Description
mkpipe
creates an input pipe or an output
pipe from a given pipe advertisement document. In order for pipes to
communicate, an input and output pipe need to be created with the
same pipe advertisement.
An input pipe can be bound to the same pipe advertisement on multiple peers transparently to the output pipe. The output pipe does not need to know on which physical peer the input pipe is located. To communicate with the pipe, the output pipe needs to search for the input pipe that binds the advertisement.
Options
-
-i
Creates an input pipe
-
-o
Creates an output pipe
Example
JXTA>pipeadv = mkadv -p
JXTA>inpipe = mkpipe -i pipeadv
JXTA>msg = recv inpipe
JXTA>data = get msg mytag
This example creates a pipe advertisement
(pipeadv
), creates an input pipe
(inpipe
), and receives a message
(msg
) over the pipe. The body of the message
associated with the mytag
tag is then retrieved
from the message via the get
command.
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.