🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #917

Indy TCP

#917
From: Jesper
Date: Fri, 09 Dec 2005 20:04
25 lines
1785 bytes
Hi! I just want to say that i'm a newbie when it commes to programming.
Having said that, I have some questions.

I'm writing my own FileTransfer program, using the "IdTCPClient" and
"IdTCPServer" components in BCB6. I know how to create a connection to the
'other side', but I can't send any files.

Here's the code:

IdTCPClient1->BoundIP = Edit1->Text;                           //The IP of
the other computer
IdTCPClient1->Port = Edit2->Text.ToIntDef(0);               //The Port is
set to 3000, but can be changed
IdTCPClient1->Connect();
IdTCPClient1->WriteFile("test\\test.txt");
if(IdTCPClient1->Connected() == true)
Label3->Caption ="Connected to the other side";

My problem is IdTCPClient1->WriteFile.
If you look at the HELP text, all you get is: '' function WriteFile(AFile:
String; const AEnableTransferFile: boolean): cardinal; virtual; ''

I have no idea how to continue.

/J
Technical Details
Message-ID: <4399e31d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,9bff0e60dca4336c,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Jesper" <jesper@safholm.com>
From: "Jesper" <jesper@safholm.com>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Indy TCP
Date: Fri, 9 Dec 2005 21:04:44 +0100
Lines: 28
Organization: Blackhole Productions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 130.243.165.214
Message-ID: <4399e31d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1134158621 130.243.165.214 (9 Dec 2005 12:03:41 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail