Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Using Indy 10 UDP server, AData: TStream or AData: TBytes?
| Subject: | Re: Using Indy 10 UDP server, AData: TStream or AData: TBytes? |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 31 May 2006 14:50:22 |
"Pete" <petesouthwest@hotmail.com> wrote in message
news:447e068f$1@newsgroups.borland.com...
> How do I convert my existing code?
You don't need a TStringStream anymore. Indy 10 has a BytesToString()
function, ie:
procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TIdBytes;
ABinding: TIdSocketHandle);
begin
msg := BytesToString(AData);
end;
Gambit
none