🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TClientSocket

#5393
From: Luca
Date: Wed, 01 Sep 2004 14:29
25 lines
1595 bytes
I' m working with an old version of c++ builder (3.0 Client/Server Suite)on Windows Xp and 2000 and I have a problem with a 
TClientSocket instance. My application is a chat, and I use a TClientSocket for sending messages and a TServerSocket 
for receving messages. The problem is that after a period of normal use a ESocketException is raised because 
I try to change the Address property while the Active attribute of the TClientSocket is true, even if the Close method has been invocated. 
From this point is impossible to change the socket state even with additional calls to the Close method.

This is my code fragment :

    Client->Close();

    try
    {
        Client->Address = address;
        Client->Host = host;
    }
    catch(ESocketError *e)
    {
        ShowMessage("Error");
    }
    Client->Open();
    
Thanks for your help

Luca
Technical Details
Message-ID: <4135dcbc$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-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9c548c30b8038d07,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Luca" <salaria113@yahoo.com>
Sender: "Luca" <salaria113@yahoo.com>
Reply-To: "Luca" <salaria113@yahoo.com>
Subject: TClientSocket
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 217.59.84.9     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4135dcbc$1@newsgroups.borland.com>
Date: 1 Sep 2004 07:29:16 -0700
X-Trace: newsgroups.borland.com 1094048956 207.105.83.66 (1 Sep 2004 07:29:16 -0700)
Lines: 25
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