//send the file (client)
while ...
BlockRead(f, FileBuf.buf, SizeOf(FileBuf.buf), FileBuf.bufSize);
FBuf.ID:=1;
WSocket1.Send(@FileBuf, sizeof(FileBuf));
end;
With such code, then the file is almost read in memory before sending anything.
You forgot that the component is
Hello Sela,
- Are you taken into account that nRead also can be 0 or -1 ?
- You create a TStream in every OnDataAvailable. I think you need the
TStream to put the file in right ? Then only create it one time.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html