Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

ChannelSend

ChannelSend[channel,msg]
sends the specified message msg to the specified channel.

Details and OptionsDetails 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).

ExamplesExamplesopen allclose all

Basic Examples  (1)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]=
Introduced in 2016
(11.0)