Hi,
I need to notify my client applications that the Server is up and running.
When the server goes online (ie. starts to listen) I would like to broadcast a message to all the clients, using UDP.
Is there a way to make rtcUDPServer broadcast a message to any clients on the same network?
I assigned the following properties:
procedure TForm56.btnListenClick(Sender: TObject);
begin
UDPServer.UdpMultiCastAddr := '192.168.0.255';
UDPServer.UdpReuseAddr := True; // (Server and client might be on the same server)
UDPServer.Listen;
end;
procedure TForm56.btnStopClick(Sender: TObject);
begin
UDPServer.StopListen;
end;
procedure TForm56.btnBroadcastClick(Sender: TObject);
begin
UDPServer.UdpMultiCast := True;
UDPServer.Write('Hello guys');
UDPServer.UdpMultiCast := False;
end;
Is it possible? Or should I use a rtcUDPClient on the server to broadcast and a rtcUDPServer on the clients to receive?
Best regards,
Clément