ja soweit bin ich auch schon aber wie emfange ich das dann?
edit:
mein bisheriger versuch
clinet:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
FStream: TFileStream;
begin
ClientSocket1.Active:=true;
ClientSocket1.Socket.Connect(5000);
FStream := TFileStream.Create('C:\la.avi', fmOpenRead or fmShareDenyWrite);
ClientSocket1.Socket.Write(FStream.Size);
ClientSocket1.Socket.SendStream(FStream);
ClientSocket1.Socket.Disconnect(5000);
ClientSocket1.Active:=false;
freeandnil(fstream);
end;
server:
Delphi-Quellcode:
procedure TForm1.ServerSocket1ClientConnect(Sender: TObject;
Socket: TCustomWinSocket);
var
FStream:tfilestream;
i_size:integer;
begin
FStream := TFileStream.Create('C:\ka.avi', fmCreate or fmShareExclusive);
Socket.Read(i_size);
Socket.ReceiveBuf(fstream,i_size);
freeandnil(fstream);
end;