Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Indy 10: Send a file with TIdTCPClient

www.cryer.info
Managed Newsgroup Archive

Indy 10: Send a file with TIdTCPClient

Subject:Indy 10: Send a file with TIdTCPClient
Posted by:"David" (microg..@email.it)
Date:Thu, 7 Dec 2006 10:16:57

have a little proble when try to send a file with component TIdTCPClient.

My procedure is:

Client unit:

TCPClient.IOHandler.WriteLn(FileName);
TCPClient.IOHandler.WriteFile(FileName);


Server unit:

FStream := TFileStream.Create(NomeFile, fmCreate, fmOpenWrite);
AContext.Connection.IOHandler.LargeStream := True;
AContext.Connection.IOHandler.ReadStream(FStream);
FreeAndNil(FStream);

The problem is the error "Socket Error 10053" when the WriteFile
function is executed.

Someone have some idea to solve this? (Or some example)

Thanks,
David

Ps. Sorry for my English - I'm Italian

Replies:

www.cryer.info
Managed Newsgroup Archive