send [OPTIONS] EVENT-SPEC [DESTINATION-URI]
Send an event constructed according to EVENT-SPEC to listeners on scopes specified by DESTINATION-URI.
EVENT-SPEC is treated as follows:
Note
When written as part of a shell command, some of the above forms may require protection from processing by the shell, usually by surrounding the form in single quotes (‘). For example:
$ send '' ... # empty payload
$ send '#P"my-file"' ... # read payload from my-file
DESTINATION-URI designates the destination scope to which the events should be sent and the transport configuration which should be used for sending the event.
See also
Set the method field of the event being sent to METHOD. Default behavior is sending an event without method field.
Set the meta-data item NAME to VALUE in the event being sent. This option can be specified multiple times for distinct NAME s.
Set the timestamp named NAME to VALUE in the event being sent. This option can be specified multiple times for distinct NAME s.
Add the event id specified by PARTICIPANT-ID:SEQUENCE-NUMBER to the cause vector of the event being sent. This option can be specified multiple times.
$ send '' /mycomponent/trigger
Send an event without a payload to the channel designated by the scope /mycomponent/trigger.
Note
Note the use of single quotes (') to allow specifying an empty payload.
$ send '"running"' 'spread:/mycomponent/state'
Send an event whose payload is the string running to the channel designated by the scope /mycomponent/state.
Note
Note the use of single quotes (') to prevent the shell from processing the double quotes (") that identify the payload as a string.
$ send 5 'spread:/somescope?name=4803'
Send an integer. Use Spread transport, like in the previous example, but use the “daemon name” option of the Spread transport instead of specifying host and port.
Note
Note the use of single quotes (') to prevent elements of the destination URI from being processed by the shell (not necessary for all shells).
$ cat my-data.txt | send - 'socket:/printer'
$ cat my-data.txt | send -:binary 'socket:/printer'
$ send '#P"my-data.txt"' 'socket:/printer'
$ send '#P"my-data.txt":latin-1' 'socket:/printer'
$ send '#P"my-data.txt":binary' 'socket:/printer'
Two ways of sending the content of the file my-data.txt to the scope /printer using the socket transport (with its default configuration). This form can only be used for sending string payloads.
Note
Note the use of single quotes (') to prevent elements of the pathname #"Pmy-data.txt" from being processed by the shell.
Implementation Language | Project | Repository Link |
---|---|---|
Common Lisp | rsb-tools-cl | “0.11” branch of https://code.cor-lab.org/git/rsb.git.tools-cl |