🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TServerClientWinSocket->Data Help Please

#143
From: Remy Lebeau (TeamB)
Date: Mon, 02 Jun 2008 16:28
25 lines
1676 bytes
"DreamChaser" <NO-Spam@No-Span.net> wrote in message 
news:48416d7a$1@newsgroups.borland.com...

> Has anybody gotten TServerClientWinSocket->Data to work with
> storing an AnsiString? I got a new AnsiString() assigned to it during
> the OnClientConnect event, and it seemed to work, but I am unsure
> where/how to delete it.

Use the OnClientDisconnect event, ie:

    void __fastcall TForm1::ServerSocket1ClientConnect(TObject* Sender, 
TCustomWinSocket* Socket)
    {
        Socket->Data = new AnsiString();
    }

    void __fastcall TForm1::ServerSocket1ClientDisconnect(TObject* Sender, 
TCustomWinSocket* Socket)
    {
        delete (AnsiString*) Socket->Data;
    }


Gambit 
Technical Details
Message-ID: <48441ff3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <48416d7a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,67ea390c53ca6f1c
X-Google-Attributes: gid11508e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <48416d7a$1@newsgroups.borland.com>
Subject: Re: TServerClientWinSocket->Data Help Please
Date: Mon, 2 Jun 2008 09:28:43 -0700
Lines: 27
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 207.178.157.90
Message-ID: <48441ff3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1212424179 207.178.157.90 (2 Jun 2008 09:29:39 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail