Article View: borland.public.cppbuilder.internet.socket
Article #138Re: Hair 0, Indy10 1
From: Gene Buckle
Date: Fri, 30 May 2008 22:52
Date: Fri, 30 May 2008 22:52
67 lines
3063 bytes
3063 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
>> Now while calling it with (NULL) compiles, it doesn't actually appear to
>> work.
>
> Yes, it does.
>
Whatever it does, does not contribute to the proper function of the component. :)
>> When I do this:
>> TCPClient->Host = "localhost";
>> TCPClient->Port = 5500;
>>
>> and then
>>
>> ShowMessage(TCPClient->Host);
>>
>> The dialog shows nothing.
>
> It should. TIdTCPClient does not do anything to reset that property back to
> an empty string.
>
That's what it does. ShowMessage(TCPClient->Host) creates a blank dialog box.
>> I can call TCPClient->Connect() and get no exception,
>> yet TCPClient->Connected() returns false.
>
> You are using TIdIOHandlerStream, but you did not assign any TStream objects
> to its ReceiveStream and SendStream properties.
>
It would help if that kind of thing were documented.. Oh wait.
I keep forgetting who this is from. :)
> If you are trying to establish an actual TCP/IP connection, then you need to
> use TIdIOHandlerStack instead. Or just leave the IOHandler set to NULL.
> Connect() will create its own TIdIOHandlerStack internally if you do not
> have your own IOHandler assigned.
>
Ok, great. Dropped the specific assignment of the IOHandler.
>> Calling TCPClient->IOHandler->Connected() (or anything else under
>> TCPClient->IOHandler) just pitches an access violation exception.
>
> It will only do that if the IOHandler is NULL, which is not the case in your
> code you have shown.
Well it apparently can't read your reply because it continues to do it in the
face of your opposition. :) After leaving IOHandler unassigned, it
continues to throw exceptions:
Simulator->TCPClient->IOHandler->WriteLn("foo!");
...results in an access violation.
Any suggestions as to how I can actualy make this work? A C++ example would
be great.
I figure I'm either doing something really simple, really wrong, or their
software is terminally broken. Either way I need it to work as advertised
or I need a pointer to a similar component that will actually WORK with CB2k7.
thanks.
g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
Technical Details
Message-ID:
<48408535@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<48406d41@newsgroups.borland.com> <48407d4c$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: <48408535@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>
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: 30 May 2008 15:52:37 -0700
X-Trace: newsgroups.borland.com 1212187957 199.254.199.46 (30 May 2008 15:52:37 -0700)
Lines: 67
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail