procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
var
s:TstringStream;
begin
S:=TstringStream.creat('');rom(AData.AData.size);
try
======================================收
s.copyForm(AData,AData.size);
==========================================
if(ComPareText(SDAtastring,'Play')=0) then
Mediaplayer1.Play;
else if(ComPareText(SDAtastring,'stop')=0) then
Mediaplayer1.stop;
=================================发
idUDPser1.Send(SPeerIP,APeerPort,S.DataString);
=========================================
finally
s.free;
end;
end;