全部博文(788)
分类:
2008-10-28 10:00:11
procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
var
a:array of char;
s:string;
begin
SetLength(a,AData.Size);
AData.ReadBuffer(A[0],AData.Size);
s:=PChar(@A[0]);
end;
TMemoryStream 是内存流 TStringStream是字符窜流
一个是存入内存流里面 一个是存入字符窜的流里面~~