ich verstehe ich ganz wie das funktionieren soll
client:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
ClientSocket1.Active:=true;
ClientSocket1.Socket.Connect(5000);
end;
procedure TForm1.ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
begin
FStream := TFileStream.Create('C:\ka.mdf', fmCreate or fmShareExclusive);
i_size:=strtoint(socket.ReceiveText);
socket.ReceiveBuf(fstream,i_size);
end;
server:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
FStream := TFileStream.Create('X:\bluetooth.mdf', fmOpenRead or fmShareDenyWrite);
serversocket1.Socket.connections[0].SendText(inttostr(fstream.Size));
serversocket1.Socket.connections[0].SendStream(fstream);
end;
blos wo is da der fehler?