🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1593

Indy 10: Send a file with TIdTCPClient

#1593
From: David
Date: Thu, 07 Dec 2006 09:07
26 lines
1463 bytes
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
Technical Details
Message-ID: <4577d9b5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6fbabc84eb654d68
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 07 Dec 2006 10:07:31 +0100
From: David <microges@email.it>
User-Agent: Mozilla Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Indy 10: Send a file with TIdTCPClient
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 213.233.12.146
Message-ID: <4577d9b5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1165482421 213.233.12.146 (7 Dec 2006 01:07:01 -0700)
Lines: 26
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail