UDP and Broadcast Channels

The UDP and Broadcast channels are available for Delphi only.

Next to TCP, UDP is the second base transfer protocol of the internet's TCP/IP network infrastructure. In contrast to TCP, UDP does not provide the concept of a stream based connection between client and server, but instead sends individual data packets - so called datagrams over the network.

UDP also provides no error correction or guaranteed delivery, so packets sent via UDP might get lost and not arrive at the target destination, or get corrupted and simply discarded. Also, UDP doesn't support large packages, which get truncated. On the upside, the UDP protocol is very fast and efficient compared to TCP.

You should consider using the UDP based channel if you need to send small data packets at high frequency and very efficiently, and you don't need to rely on network error correction and package recovery features provided by TCP. Most likely this will be in LAN scenarios, where network infrastructure is dependable and chances of packet loss are minimal.

The Broadcast channel is a variation of the UDP channel that allows you to send requests to all available servers listening on the local network using UDP broadcast. This is useful in notification scenarios, or for discovering available servers.

You will usually use both of these channels in asynchronous mode; For broadcast scenarios, your servers will either call ROSendNoResponse to prevent any response form being sent (so that a large number of recipients can quietly swallow a notification message), or your client will be prepared to receive multiple responses.

Client Channel Components

Server Channel Components