# TCP & UDP

Setting up sending and receiving UDP and TCP is basically the same, so in this document, we will go through the steps required to send or receive UDP messages.

## Receiving UDP

### Setup in the Devices window

Insert a **UDP Receiver** node and after you set *Stream* parameters check the **Receive** checkbox.​

<div align="left"><figure><img src="/files/1xnFQUXQhvoa55ZP1Dr8" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know**: for TCP you need to insert a **TCP Receiver** node.
{% endhint %}

### Setup in the Layouts window

Insert a **Read UDP** node, choose the device in **Device** input.

<div align="left"><figure><img src="/files/o68lNNISOjs4lRVNiAxY" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know**: for TCP you need to insert a **Read TCP** node
{% endhint %}

## Sending UDP

### Setup in the Devices window

Insert a **UDP Sender** node and after you set *Stream* parameters check the **Send** checkbox.​

<div align="left"><figure><img src="/files/2sTrfeA7eMPwdpPDoV5s" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know**: for TCP you need to insert a **TCP Sender** node
{% endhint %}

### Setup in the Layouts window

Insert a **Send** **UDP** node, choose the device in **Device** input and set the **Message** which will be sent.

<div align="left"><figure><img src="/files/F0NUi2fdoqFQjAzynh9u" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know**: for TCP you need to insert a **Send TCP** node
{% endhint %}


---

# 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.lightact.com/integrations/network/tcp-and-udp.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.
