🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Socket Runtime questions (Again)

#4852
From: Remy Lebeau (TeamB)
Date: Mon, 29 Nov 2004 20:00
19 lines
1620 bytes
"Dev Support" <infsoft@centurytel.net> wrote in message
news:41ab6cef$2@newsgroups.borland.com...

> Thanks for the help but am I casting this thing wrong:

Yes, you are.  You should be casting the Sender itself, not its Name:

    ((TClientSocket *)Sender)->Name;

You don't need its Name, though, to know which socket is triggering the
event.  Just use the Sender directly, it is already a pointer to the
specific socket.

    TClientSocket *ASocket = (TClientSocket*)Sender;
    ASocket->DoSomething...


Gambit
Technical Details
Message-ID: <41ab7fdf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!feeder1.cambrium.nl!news.cambrium.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <419cd7f5@newsgroups.borland.com> <419cef78$1@newsgroups.borland.com> <41a8c7fe$1@newsgroups.borland.com> <41aa51c1$1@newsgroups.borland.com> <41ab6cef$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,18bd2c5dd1b06641
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <419cd7f5@newsgroups.borland.com> <419cef78$1@newsgroups.borland.com> <41a8c7fe$1@newsgroups.borland.com> <41aa51c1$1@newsgroups.borland.com> <41ab6cef$2@newsgroups.borland.com>
Subject: Re: Socket Runtime questions (Again)
Date: Mon, 29 Nov 2004 12:00:31 -0800
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41ab7fdf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101758431 68.69.17.41 (29 Nov 2004 12:00:31 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!feeder1.cambrium.nl!news.cambrium.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail