hi!
habe folgenden code:
Delphi-Quellcode:
procedure TForm1.Button3Click(Sender: TObject);
var
fs: tfilestream;
ms:tmemorystream;
ilast:int64;
inext:integer;
stream: tidstreamvcl;
begin
fs:= tfilestream.Create('c:\katze1.jpg',fmopenread);
ms:= tmemorystream.Create;
ilast:=0;
while (ilast < fs.Size) do begin
inext:= fs.Size-ilast;
if inext > 10000 then
inext:=10000;
fs.Position:=ilast;
ms.CopyFrom(fs,inext);
try
stream:= tidstreamvcl.Create(ms);
memo1.lines.add('infos '+inttostr(ilast)+' '+inttostr(stream.Size)+' '+inttostr(ms.size));
finally
client.Socket.WriteBufferOpen;
//sleep(50);
client.Socket.Write(stream,stream.size,true);
//sleep(50);
client.Socket.WriteBufferClose;
//client.Socket.WriteBuffercancel;
stream.free;
ilast:=ilast+inext;
end;
end;
ms.Free;
fs.free;
end;
da bekomm ich nach(!) den ersten 10000 verschickten bytes einen "EIdNoDataToSend"..
hat eienr ne ahnung, was daran falsch ist?
danke!!