Article View: borland.public.cppbuilder.internet.socket
Article #148Re: Hair 0, Indy10 1
From: Gene Buckle
Date: Tue, 03 Jun 2008 19:54
Date: Tue, 03 Jun 2008 19:54
146 lines
4650 bytes
4650 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
> "Gene Buckle" <geneb@grumble.deltasoft.com> wrote in message
> news:4845851e@newsgroups.borland.com...
>
>> Thanks Dennis. I read and re-read the docs and still couldn't make it
>> work.
>
> What EXACTLY are you having trouble with? You haven't answered my last
> message yet.
>
That's because I gave up in disgust waiting for the powers that be to get
off the dime and fix the news server over the weekend. I changed the
code.
>> Strangely enough (ok, not strangely, "typically"), there's no
>> documentation on it at all in the help files.
>
> TTcpClient is a CLX component, not a VCL component. Did you look in the CLX
> documentation?
>
So I should assume that using the help system with the Filter set to
"(No Filter)" means that it'll show me everything EXCEPT the CLX help?
Let me do a search and see what shows up, because the index is empty
regarding TTCPClient.
Ahh, here we go:
"TTCPClient" <search>
Local Help (0)
MSDN Online (0)
Codezone Community (0)
Questions (0)
RAD Studio 2007 with latest help file patch applied.
Assume for a while that while I'm no where near a C++ expert, I'm by no means
an idiot. Give me a *little* credit. When I tell you there's no mention
of TTCPClient in the help file, don't assume I'm some stumbling half-wit CS
student that can't find the farking off button without a map and an assistant.
>
> So does TIdTCPClient when used properly. Again, please answer my last
> message regarding that.
>
Is this, or is this not the correct way to use TIdTCPClient:
(included files - I don't recall where I got this list from)
#include <IdBaseComponent.hpp>
#include <IdComponent.hpp>
#include <IdIOHandler.hpp>
#include <IdIOHandlerStream.hpp>
#include <IdTCPClient.hpp>
#include <IdTCPConnection.hpp>
TIdTCPClient *Client;
bool connected;
Client = new TIdTCPClient(NULL):
Client->Port = 5500;
Client->Host = "localhost";
Client->Connect();
connected = Client->Connected();
This is _EXACTLY_ how I'm using (or was) this library. If I'm missing a step
please enlighten me.
FYI, attached is the only copy I have of the code that still shows the use of
the TIdTCPClient component before I tore it out:
#pragma hdrstop
#include "classSimulator.h"
#include "defines.h"
#include "frmMain.h"
bool init_done;
__fastcall classSimulator::classSimulator() {
busy = false;
init_done = false;
}
__fastcall classSimulator::~classSimulator() {
}
void __fastcall classSimulator::InitCommSystem() {
if (!init_done) {
busy = true;
TCPClient = new TIdTCPClient(NULL);
TCPClient->OnDisconnected = MainForm->DisconnectHandler;
busy = false;
init_done = true;
}
}
bool __fastcall classSimulator::StartComms() {
// connects to the selected simulator
TCPClient->Port = 5500;
TCPClient->Host = "localhost";
try {
TCPClient->Connect();
return true;
} catch (Exception &ex) {
return false;
}
}
void __fastcall classSimulator::StopComms() {
// disconnects from the selected simulator
if (TCPClient->Connected()) {
TCPClient->Disconnect();
}
}
void __fastcall classSimulator::CloseCommSystem() {
TCPClient->Free();
}
bool __fastcall GetBoolValue(int function_code) {
}
void __fastcall SetBoolValue(int function_code, bool value) {
}
tnx.
g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
Technical Details
Message-ID:
<4845a18d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!194.134.4.77.MISMATCH!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<48406d41@newsgroups.borland.com> <48407d4c$1@newsgroups.borland.com> <48408535@newsgroups.borland.com> <48442d6c$1@newsgroups.borland.com> <4845851e@newsgroups.borland.com> <48459486$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9339fc05f2f275c
X-Google-Attributes: gid11508e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Message-ID: <4845a18d@newsgroups.borland.com>
From: Gene Buckle <geneb@grumble.deltasoft.com>
Subject: Re: Hair 0, Indy10 1
Newsgroups: borland.public.cppbuilder.internet.socket
References: <48406d41@newsgroups.borland.com> <48407d4c$1@newsgroups.borland.com> <48408535@newsgroups.borland.com> <48442d6c$1@newsgroups.borland.com> <4845851e@newsgroups.borland.com> <48459486$1@newsgroups.borland.com>
User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (Linux/2.6.23.15-80.fc7 (i686))
NNTP-Posting-Host: 199.254.199.46
Date: 3 Jun 2008 12:54:53 -0700
X-Trace: newsgroups.borland.com 1212522893 199.254.199.46 (3 Jun 2008 12:54:53 -0700)
Lines: 146
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!194.134.4.77.MISMATCH!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail