Mensajería instantánea con contenido arbitrario
En una sesión de escritorio, cargue un paquete que cree un canal de demostración de mensajería instantánea ("WIM") y comience a escuchar en él.
In[1]:=

Needs["DemoChannels`WIM`"]
Cree su canal WIM y comience a escuchar en él.
In[2]:=

channel = CreateWIMChannel[]
Out[2]=

In[3]:=

listener = ChannelListen[channel]
Out[3]=

Envíese a usted mismo un WIM, y note su mensaje en un nuevo cuaderno de diálogo.
In[4]:=

ChannelSend["WIM", "Hi there."]
Out[4]=

Out[5]=

Adjunte el actual cuaderno a un mensaje.
In[6]:=

ChannelSend["WIM", {"Sending a notebook.", InputNotebook[]}]
Out[6]=

Out[7]=

Otros usuarios pueden enviarle un WIM incluyendo su canal completamente calificado.
In[8]:=

yourWIM = $WolframID <> ":WIM"
Out[8]=

In[9]:=

ChannelSend[yourWIM, "hello"]
Out[9]=

O su URL de WIM.
In[10]:=

listener["URL"]
Out[10]=

In[11]:=

listener["URL"];
ChannelSend[%, "another message"]
Out[11]=

Cualquier persona también puede enviarle un mensaje desde un navegador web (o cualquier otro cliente HTTP) creando una solicitud de HTTP al siguiente URL.
In[12]:=

URLBuild[listener["URL"], {"operation" -> "send",
"Message" -> "yet another message"}]
Out[12]=

In[13]:=

URLBuild[listener["URL"], {"operation" -> "send",
"Message" -> "yet another message"}];
URLFetch[%]
Out[13]=

Para responder a los mensajes entrantes desde otros usuarios, autorice la comunicación en los canales de usuario.
In[14]:=

Unprotect[$AllowExternalChannelFunctions];
$AllowExternalChannelFunctions = True;
Deje de escuchar y restaure la configuración de seguridad.
In[15]:=

RemoveChannelListener[listener]
Out[15]=

In[16]:=

$AllowExternalChannelFunctions = False;
Protect[$AllowExternalChannelFunctions];