diff --git a/Docs/UDPStreamer.md b/Docs/UDPStreamer.md index f809b3c..28eb48f 100644 --- a/Docs/UDPStreamer.md +++ b/Docs/UDPStreamer.md @@ -36,7 +36,8 @@ thread. // Multicast (optional — omit for unicast mode) MulticastGroup = "239.0.0.1" // IPv4 multicast address (224.0.0.0/4) - Interface = "eth0" // Multicast-bound interface (mandatory when MulticastGroup is set) + Interface = "192.168.1.10" // Local IPv4 address of the outgoing interface + // (mandatory when MulticastGroup is set) DataPort = 44501 // UDP port for multicast DATA (default: Port+1) // Publishing mode (optional) @@ -87,7 +88,7 @@ thread. | `Port` | uint16 | 44500 | UDP server port (unicast) or TCP control port (multicast). Values ≤ 1024 produce a warning. | | `MaxPayloadSize` | uint32 | 1400 | Max payload bytes per UDP datagram (min 18) | | `MulticastGroup` | string | *(absent)* | IPv4 multicast address (e.g. `"239.0.0.1"`). Must be in 224.0.0.0/4. Absent or empty = unicast mode. | -| `Interface` | string | *(absent)* | Network interface for multicast binding (e.g. `"eth0"`). **Mandatory** when `MulticastGroup` is set. | +| `Interface` | string | *(absent)* | Local IPv4 address of the interface multicast DATA leaves from, in dotted-quad form (e.g. `"192.168.1.10"`, or `"127.0.0.1"` for loopback-only testing). **Not** an interface name — `"eth0"` is rejected. **Mandatory** when `MulticastGroup` is set. | | `DataPort` | uint16 | Port+1 | UDP port for multicast DATA datagrams. Ignored in unicast mode. | | `PublishingMode` | string | Strict | `Strict`: send every RT cycle. `Accumulate`: batch until size/time limit. `Decimate`: send every Nth cycle. | | `MinRefreshRate` | float64| — | Flush frequency in Hz. **Required** when `PublishingMode` = `Accumulate`. | @@ -147,7 +148,14 @@ CONNECT evicts the previous client. ### Multicast Enabled by setting `MulticastGroup` to a valid IPv4 multicast address (224.0.0.0/4). -The `Interface` parameter is **mandatory** and specifies the network interface to bind. +The `Interface` parameter is **mandatory**. It is the local IPv4 address of the +interface DATA datagrams leave from, given in dotted-quad form — it sets +`IP_MULTICAST_IF` on the data socket and is parsed with `inet_addr()`, so an +interface *name* such as `"eth0"` is rejected and `Initialise` fails. + +Receivers must join the group on the matching interface. A receiver that joins +with `INADDR_ANY` lets the kernel pick the default-route interface, and it will +silently receive nothing if that is not the interface named by `Interface`. The server opens a TCP listener on `Port` for control traffic and a UDP socket aimed at `MulticastGroup:DataPort` for data traffic. The client: @@ -253,7 +261,7 @@ PrepareNextState() ← opens UDP server socket, starts background threa Class = UDPStreamer Port = 44500 // TCP control port MulticastGroup = "239.0.0.1" // Enables multicast mode - Interface = "eth0" // Mandatory for multicast + Interface = "192.168.1.10" // Local IP of the outgoing interface (mandatory) DataPort = 44501 // UDP data port (default: Port+1) MaxPayloadSize = 1400 PublishingMode = "Accumulate"