# TCP & UPD Control

## Configuration

Go to the Settngs menu and choose the `Comm` tab.

<figure><img src="/files/dkklpcwnsD731Xg540OR" alt=""><figcaption></figcaption></figure>

#### TCP Listen

This field contains all the ip addresses and ports the TCP command module will be listening to, each line represents an ethernet IP followed by a port, separated by a colon `:`.

Use an asterisk `*` as a wildcard to specify all Ips in the host.&#x20;

Examples:

* Listen to adapter with IP 192.168.1.229 on port 7000: `192.168.1.229:7000`&#x20;
* Listen to all local adapters on port 2500: `*:2500`

## TCP

Once configured, Exaplay can be controlled via TCP, and can send commands via TCP as well.

### TCP IN (Receive)

Exaplay will listen for TCP text line messages, ending with a `CR`. The return messages are sent ending with `CRLF`.&#x20;

Each section of the message, as well as the parameters, should be separated by commas `,`. The main format structure should be as follows:

<table data-header-hidden><thead><tr><th width="153"></th><th width="99"></th><th width="115"></th><th width="101"></th><th></th></tr></thead><tbody><tr><td><code>Command</code></td><td><code>,</code></td><td><code>address</code></td><td><code>,</code></td><td><code>Parameters (,,,)</code></td></tr></tbody></table>

Many commands are adressed to a specific composition (playlist or timeline). In Exaplay, compositions are represented as a tab, and they are adressed by an unique ID:\ <br>

<figure><img src="/files/8snFN4pKYV7k05hUghdo" alt=""><figcaption></figcaption></figure>

When using TCP-commands, the addressing of compostions follows this keyword scheme

```
comp[ID] // e,g, comp1 for composition with ID 1
```

Available commands

<table><thead><tr><th width="260">Command</th><th width="401">Description</th><th>Return</th></tr></thead><tbody><tr><td><code>hello</code></td><td>Echo test</td><td><code>hallo</code></td></tr><tr><td><code>get:ver</code></td><td>Returns the current Exaplay version. </td><td>e.g. <code>2.21.0.0</code></td></tr><tr><td><code>play,comp[ID]</code></td><td>Starts the playback of the addressed composition. <br>Example: <code>play,comp1</code></td><td> <code>OK</code> or <code>ERR</code></td></tr><tr><td><code>stop,comp[ID]</code></td><td>Stops the playback of the addressed composition.<br>Example: <code>stop,comp1</code></td><td><code>OK</code> or <code>ERR</code></td></tr><tr><td><code>pause,comp[ID]</code></td><td>Pauses the playback of the addressed composition. <br>Example: <code>pause,comp1</code></td><td><code>OK</code> or <code>ERR</code></td></tr><tr><td><code>set:cuetime,comp[ID],[s.s]</code></td><td>Moves the play cue to a given time for a timeline composition. <br>Parameter: Time in seconds (seconds.fractions)<br>Example: <code>set:cuetime,comp1,2.0</code></td><td><code>OK</code> or <code>ERR</code></td></tr><tr><td><code>set:cue,comp[ID],[i]</code></td><td>Moves to a given index, in case of a timeline composition will be a cue, in case of a cuelist composition, it will be a clip index. <br>Parameter: Index, starting from 1<br>Example: <code>set:cue,cuelist1,2</code></td><td><code>OK</code> or <code>ERR</code></td></tr><tr><td><code>set:vol,comp[ID],[i]</code></td><td>Sets the volume of a composition<br>Parameter: Volume value from 0 to 100<br>Example: <code>set:vol,comp1,60</code></td><td><code>OK</code> or <code>ERR</code></td></tr><tr><td><code>get:vol,comp[ID]</code></td><td>Returns the current volume of a composition.<br>Example: <code>get:vol,comp1</code></td><td>e.g. <code>60</code></td></tr><tr><td><code>get:status,comp[ID]</code></td><td>Retrieves the current status values for a composition object. Return values:<br>1. Current playback status. 0=stop, 1=playing, 2=pause<br>2. Current time in seconds<br>3. Current frame index<br>4. Current clip index (valid for cuelist compositions)<br>5. Total composition duration in seconds<br>Example: <code>get:status,comp1</code></td><td>e.g <code>1,15.65,939,-1,300</code></td></tr></tbody></table>

### TCP OUT (Send)

It is possible to send arbitrary TCP text line messages at certain events, configured as cue commands in Exaplay.The format structure is as follows:

<table data-header-hidden><thead><tr><th width="113"></th><th width="83"></th><th width="237"></th><th width="77"></th><th></th></tr></thead><tbody><tr><td><code>TCP</code></td><td><code>></code></td><td><code>IP Address : Port</code></td><td><code>,</code></td><td><code>Message</code></td></tr></tbody></table>

Example:

* To send the message ‘hello’ to the address 192.68.50.10 listening at port 5000: `TCP>192.168.50.10:5000,hello`

## UDP

### UDP Out

It is possible to send arbitrary UDP text messages at certain events, configured as cue commands in Exaplay. The format structure is as follows:

<table data-header-hidden><thead><tr><th width="108"></th><th width="82"></th><th></th><th width="79"></th><th></th></tr></thead><tbody><tr><td><code>UDP</code></td><td><code>></code></td><td><code>IP Address : Port</code></td><td><code>,</code></td><td><code>Message</code></td></tr></tbody></table>

Example:

* To send the message ‘hello’ to the address 192.68.50.10 listening at port 5000: UD`P>192.168.50.10:5000,hello`\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.exaplay.one/control/tcp-and-upd-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
