UDP Transport
Sends and receives UDP datagrams on a local port. Each datagram is one message, so no codec is needed.
Received messages carry the sender in their metadata (udp_source_address, udp_source_port), which Lua can use
to reply.
UDP has no connection, so every outgoing message needs a destination: use the UDP message input (destination
address and port per input) or udp_send in Lua.
Turn on Enable Broadcast to send to a broadcast address such as 255.255.255.255. For multicast, list the
groups to join; Multicast TTL limits how many routers a datagram crosses, and Multicast Loopback also
delivers your own multicast datagrams back to this computer.
Configuration reference
| Config ID | udp_transport |
| Selected by | app_transport = "udp_transport" |
| Platforms | Linux, Windows, Android |
| License | Free |
UDP datagram communication
Basic Configuration:
- Bind Address: Local address to listen on (0.0.0.0 for all interfaces, 127.0.0.1 for localhost only)
- Bind Port: Local port number to listen on
- Enable Broadcast: Allow sending and receiving broadcast packets
Multicast Configuration:
- Multicast Groups: Supports both IPv4 (e.g., 239.255.0.1) and IPv6 (e.g., ff02::1), one address per line
- IPv4 TTL: Time-To-Live for multicast packets (1-255), higher values allow wider propagation
- IPv6 Hop Limit: IPv6 multicast hop limit (1-255, currently uses system default)
- Multicast Loopback: When enabled, multicast packets sent by this host will also be received by this host
| Setting | Key | Type | Default | Notes |
|---|---|---|---|---|
| Bind Address | udp_transport_bind_address | Text (with presets) | "0.0.0.0" | Required |
| Bind Port | udp_transport_bind_port | Integer | 5000 | Required |
| Enable Broadcast | udp_transport_enable_broadcast | Boolean | false | |
| Enable Multicast | udp_transport_enable_multicast | Boolean | false | |
| Multicast Groups | udp_transport_multicast_groups | Text | see below | Shown when Enable Multicast (udp_transport_enable_multicast) = true |
| Multicast TTL | udp_transport_multicast_ttl | Integer | 1 | Shown when Enable Multicast (udp_transport_enable_multicast) = true |
| IPv6 Hop Limit | udp_transport_multicast_hop_limit | Integer | 1 | Shown when Enable Multicast (udp_transport_enable_multicast) = true |
| Multicast Loopback | udp_transport_multicast_loopback | Boolean | true | Shown when Enable Multicast (udp_transport_enable_multicast) = true |
Setting details
Bind Address
Presets (any other value can be entered):
| Value | Label |
|---|---|
"0.0.0.0" | 0.0.0.0 (Any) |
"127.0.0.1" | 127.0.0.1 (Localhost) |
Multicast Groups
Default:
239.255.0.1
ff02::1
Example config
Default values as they appear in a saved configuration (for example the JSON block at the end of a cycbox/examples/*.lua file). Settings detected at runtime are omitted.
{
"app": {
"app_transport": "udp_transport"
},
"udp_transport": {
"udp_transport_bind_address": "0.0.0.0",
"udp_transport_bind_port": 5000,
"udp_transport_enable_broadcast": false,
"udp_transport_enable_multicast": false,
"udp_transport_multicast_groups": "239.255.0.1\nff02::1",
"udp_transport_multicast_ttl": 1,
"udp_transport_multicast_hop_limit": 1,
"udp_transport_multicast_loopback": true
}
}