Article View: borland.public.cppbuilder.internet.socket
Article #5406Re: TClientSocket
From: Luca
Date: Fri, 03 Sep 2004 13:13
Date: Fri, 03 Sep 2004 13:13
58 lines
2162 bytes
2162 bytes
"Vladimir Stefanovic" <spam@not.needed> wrote:
>> I try to change the Address property while the Active attribute
>> of the TClientSocket is true, even if the Close method has
>> been invocated.
>
>Active has to be false if you want to change address. I'm the
>absolute beginner is sockets, but lets try (with my experiences).
>
>I have similar problems when this skeleton is applied:
>
>Close()
>ChangeAttributes()
>Open()
>Send()
>
>I found smarter to WAIT for appropriate events to be triggered
>before I take ANY action (like changing/sending). That means:
>
>Close();
>OnDisconnect() { ChangeAttributes() }
>Open();
>OnConnect() { Send() }
>
>... or similar.
>
>
>> Client->Address = address;
>> Client->Host = host;
>
Thanks Vladimir for your help but unfortunately the problem still exists .
I tryed to delete the TClientSocket instance and to instantiate a new object; code follows:
delete clientSocket;
clientSocket = new TClientSocket(this)
where "this" is the form where the TClientSocket component is located; but this code doesn't work, do you have any suggestion ?
Thanks in advance
Best Regards
Luca
>Are you always changing BOTH address & host? Are you sure
>that the problem is not in connection with the passed values?
>
>
>
>Best regards,
>Vladimir Stefanovic
>
>
>
Technical Details
Message-ID:
<41386e11$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4135dcbc$1@newsgroups.borland.com> <4135f74b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9c548c30b8038d07 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Luca" <l.asa@hotmail.com> Sender: "Luca" <l.asa@hotmail.com> Reply-To: "Luca" <l.asa@hotmail.com> Subject: Re: TClientSocket Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 217.59.84.9 References: <4135dcbc$1@newsgroups.borland.com> <4135f74b@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <41386e11$1@newsgroups.borland.com> Date: 3 Sep 2004 06:13:53 -0700 X-Trace: newsgroups.borland.com 1094217233 207.105.83.66 (3 Sep 2004 06:13:53 -0700) Lines: 59 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail