A simple, cross-platform demo (VCL + FMX) showing how to Super Fast LAN tethering in IPv4 network Automatically discover a server on the same LAN using UDP Broadcast with Indy components.
📌 Overview
This project demonstrates a lightweight, zero-configuration **auto-discovery mechanism**:
- The **Server** listens on a known UDP port (`3434`) for broadcast packets.
- A **Client** (VCL or FMX/Android) sends a broadcast message (`Discovery|Hello...`) on port `3434`.
- The **Server replies** directly to the client (on port `22049`) with its LAN IP address.
- The **Client receives the reply**, extracts the server’s IP, and can then connect via TCP or continue communication.
This makes it possible to build applications that can **find each other on the same LAN instantly** without manual IP setup.
🏗 Components Used
- Indy UDP Components
- TIdUDPServer.
- TIdUDPClient.
2. - Cross-platform IP detection
- Windows: `GetAdaptersAddresses` API
- Android: `Java.Net.NetworkInterface` enumeration
3. - Thread-safe logging via `TThread.Queue`.
4. - Timer to control discovery message sending Loop
All details has been added in my Github Repo here.
Mit Licence: Please feel free to fork and improve & use it on your projects...
Any remarks or suggestions are very wellcome here.
--
thank you All.