🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TClientSocket

#5395
From: Vladimir Stefanovic
Date: Wed, 01 Sep 2004 16:17
35 lines
1695 bytes
> 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;

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: <4135f74b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4135dcbc$1@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: "Vladimir Stefanovic" <spam@not.needed>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4135dcbc$1@newsgroups.borland.com>
Subject: Re: TClientSocket
Date: Wed, 1 Sep 2004 18:17:24 +0200
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 213.137.116.204
Message-ID: <4135f74b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1094055755 213.137.116.204 (1 Sep 2004 09:22:35 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail