Difference between revisions of "WebSocket DAT"

From TouchDesigner Documentation
Jump to: navigation, search
(TD Editor)
Line 93: Line 93:
 
|OPfamily=DAT
 
|OPfamily=DAT
 
|Parname=executeloc
 
|Parname=executeloc
|Itemsummary=The script is executed from the location of the DAT specified in the <span class="tipTextDAT">Callbacks DAT</span> parameter.
+
|Itemsummary=The script is executed from the location of the DAT specified in the Callbacks DAT parameter.
 
|Itemname=callbacks
 
|Itemname=callbacks
 
}}
 
}}
Line 100: Line 100:
 
|OPfamily=DAT
 
|OPfamily=DAT
 
|Parname=executeloc
 
|Parname=executeloc
|Itemsummary=The script is executed from the operator specified in the <span class="tipTextDAT">From Operator</span> parameter below.
+
|Itemsummary=The script is executed from the operator specified in the From Operator parameter below.
 
|Itemname=op
 
|Itemname=op
 
}}
 
}}
Line 111: Line 111:
 
|Parname=fromop
 
|Parname=fromop
 
|Parorder=2
 
|Parorder=2
|Parsummary=The operator whose state change will trigger the DAT to execute its script when <span class="tipTextDAT">Execute from</span> is set to <span class="tipTextDAT">Specified Operator</span>. This operator is also the path that the script will be executed from if the <span class="tipTextDAT">Execute from</span> parameter is set to <span class="tipTextDAT">Specified Operator</span>.
+
|Parsummary=The operator whose state change will trigger the DAT to execute its script when Execute from is set to Specified Operator. This operator is also the path that the script will be executed from if the Execute from parameter is set to Specified Operator.
 
|Parlabel=From Operator
 
|Parlabel=From Operator
 
}}
 
}}

Revision as of 18:27, 9 March 2018

  • Invalid title: ""

Summary
[edit]

The WebSocket DAT receives and parses WebSocket messages. WebSockets are fast an efficient two way communication protocol used by web servers and clients. Each message is parsed and appended as a row in the DAT's table. The table is FIFO "first-in first-out" and limited to parameter-set number of lines. An optional script may be run for each packet received. The WebSocket DAT also supports the Socket.IO up to version 0.9.16 handshake protocol. Secure (tls) websocket servers are also supported. Connections to different websocket sites are supported without requiring manual header setup.


See also: TCP/IP DAT

Example project: chat with WebSockets

PythonIcon.png[[{{{opClass}}}]]


Parameters - Page

Template:ParToggle Template:ParString Template:ParInteger Template:ParToggle Template:ParString


Parameters - Page

Template:ParDatRef Template:ParMenu Template:ParNodeRef Template:ParToggle Template:ParInteger Template:ParButton Template:ParToggle


Parameters - Common Page

Language language - - Select how the DAT decides which script language to operate on.

  • Input input - The DAT uses the inputs script language.
  • Node node - The DAT uses it's own script language.

Edit/View Extension extension - - Select the file extension this DAT should expose to external editors.

  • dat dat - various common file extensions.
  • From Language language - pick extension from DATs script language.
  • Custom Extension custom - Specify a custom extension.

Custom Extension customext - Specifiy the custom extension.  

Word Wrap wordwrap - - Enable Word Wrap for Node Display.

  • Input input - The DAT uses the inputs setting.
  • On on - Turn on Word Wrap.
  • Off off - Turn off Word Wrap.

TouchDesigner Build:

DATs
Art-Net • CHOP Execute • CHOP to • Clip • Convert • CPlusPlus • DAT •  Execute • DAT xport • Error • EtherDream • Evaluate • Examine • Execute • FIFO • File In • File Out • Folder • In • Indices • Info • Insert • Introduction To DATs id • Keyboard In • Lookup • Merge • MIDI Event • MIDI In • Monitors • MQTT Client • Multi Touch In • NDI • Null • OP Execute • OP Find • OSC In • OSC Out • Out • Panel Execute • Parameter • Parameter Execute • Perform • Render Pick • Reorder • Script • Select • Serial • Experimental:SocketIO • SOP to • Sort • Substitute • Switch • Table • TCP/IP • Text • Touch In • Touch Out • Transpose • TUIO In • UDP In • UDP Out • UDT In • UDT Out • Experimental:Web Client • Web • Experimental:Web Server • WebSocket • XML

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

The generic thing that holds an Operator, and includes Flags (display, bypass, lock, render, immune) and its position/size in the network. Whether you "lay down an Operator" or "lay down an Node", you're doing the same thing.