🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TCP

#2996
From: Jesper
Date: Fri, 09 Dec 2005 19:46
25 lines
1942 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: <4399dee8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ae2c1a9c997cef31,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Jesper" <jesper@safholm.com>
From: "Jesper" <jesper@safholm.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TCP
Date: Fri, 9 Dec 2005 20:46:49 +0100
Lines: 27
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: <4399dee8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1134157544 130.243.165.214 (9 Dec 2005 11:45:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail