I'm looking for a simple UDP example/demo application for Delphi XE-7 and Indy 10.6.0.5169.
I've been looking for a while and everything I keep finding are for older versions of Indy or Delphi that no longer compile.
I need to implement the UDP Clients in order to handle WS-Discovery messages.
I tried to use the application listed here:
http://delphi.about.com/library/weekly/code/src101105.zip
SendBuffer
is giving me an error here:
procedure TUDPSearchForm.SearchPartner;
var
x: Array[0..3] of Byte;
begin
RadioGroup1.Items.Clear;
RadioGroup1.ItemIndex := -1;
Height := 50+13;
Top := Top;
Left := left;
Show;
IdUDPClient1.Host := '255.255.255.255';
IdUDPClient1.Active := true;
IdUDPClient1.BroadcastEnabled := True;
x[0] := $00; // Search Receivers
x[1] := $00; // Search
x[2] := MessageCount div $100;
x[3] := MessageCount mod $100;
inc(MessageCount);
IdUDPClient1.Port := UDPDefaultPort;
IdUDPClient1.SendBuffer(x, 4);
IdUDPClient1.BroadcastEnabled := False;
end;