ChannelSend

ChannelSend[channel,msg]

sends the specified message msg to the specified channel.

Details and Options

  • In ChannelSend[channel,], channel can be specified as a channel object or in any of the forms used inside ChannelObject.
  • The message will typically be an association of the form <|"param1"->val1,|> but can be any expression.
  • ChannelSend[channel,msg] preprocesses msg by applying to it the function specified as the setting for ChannelPreSendFunction for channel.
  • With the default setting $AllowExternalChannelFunctions=False, ChannelSend[channel,] works only for certified channels and for channels owned by you.
  • The effect of ChannelSend[channel,assoc] can be achieved with an HTTP request to the channel URL with operation=send in the query string and the serialized association assoc in the body (for a POST request) or the query string (for a GET request).

Examples

open allclose all

Basic Examples  (1)

Start listening on a channel and send a message on the channel:

In[1]:=
Click for copyable input
Out[1]=

Send a message on the channel:

In[2]:=
Click for copyable input
Out[2]=

The message is available from the listener, in the form specified for the ChannelListener object:

In[3]:=
Click for copyable input
Out[3]=

Scope  (5)

Applications  (1)

Properties & Relations  (3)

Possible Issues  (1)

See Also

ChannelListen  ChannelObject  CreateChannel  LinkWrite  SendMessage

Introduced in 2016
(11.0)