Search code examples
delphiudpdelphi-xe2firemonkey

Listening to (IP address, UDP port) from Delphi firemonkey application


I have a pipe outputting some message via a UDP port (IP address, UDP port) which I want to listen to from delphi firemonkey application. The pipe just outputs messages and doesn't handle connections. Which INDY component should I use in my delphi firemonkey application so that I can listen to (IP address, UDP port) and recieve the messages.


Solution

  • Use TIdUDPServer. Add an entry to its Bindings collection for the local IP/Port that you want to listen on, and assign an OnUDPRead event handler to handle received packets as needed.