Board index » delphi » Indy 10: Last information
David
Delphi Developer |
Indy 10: Last information2006-12-07 11:01:56 PM delphi64 I have 2 little problems with indy components. 1) If I have the following procedure: For I := 1 To 10 Do Begin TCPClient.IOHandler.WriteLn(Command); TCPClient.IOHandler.Write(I); TCPClient.IOHandler.ReadBytes(RI, SizeOf(R)); BytesToRaw(RI, R, SizeOf(R)); Memo1.Lines.Add('Name: '+R.Name); Memo1.Lines.Add('Info: '+R.Info); End; The following records to the number 1 are not correctly read (the value after the first record is not modified) But if I create a procedure of external reading to the cycle: Procedure TForm1.Read( Number : Integer; Var R : MyRec); Var RI : tIdBytes; Begin TCPClient.IOHandler.WriteLn(Command); TCPClient.IOHandler.Write(I); TCPClient.IOHandler.ReadBytes(RI, SizeOf(R)); BytesToRaw(RI, R, SizeOf(R)); End; And call it during the cicle: For I := 1 To 10 Do Begin Read(I, R); Memo1.Lines.Add('Name: '+R.Name); Memo1.Lines.Add('Info: '+R.Info); End; All the records are correctly readed. As it is possible? 2) If I transfer a file among two computers using a FileStream the speed it is very very low. How could I increase it? Thanks, David |