🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: sockets????

#3224
From: Remy Lebeau (TeamB)
Date: Sat, 29 Oct 2005 18:28
36 lines
2254 bytes
"Gary D" <gcdesroches@nctc.com> wrote in message
news:43636b7d@newsgroups.borland.com...

>         Fire_Event1(&strName);

You should not be using the & operator there:

    Fire_Event1(strName);

> So here is the thing I am stuck on. How do I replace a local bool
> with an external one which will use the client's existing connection?

You don't.

> ( and accept new connections )

That is handled automatically by COM for you.  Every time
TTestEventsImplImpl is instantiated, that instance represents a new client
connection.

> I can't figure out how to access Trigger() inside the Server Code at all

Trigger() should be a public method of the TTestEventsImplImpl class.  Given
a pointer to a TTestEventsImplImpl instance, you can call Trigger() on it.

> let alone get an instance of it that has active connection(s) to the
client(s).

Simply keep a list of instantiated TTestEventsImplImpl instances.  In
TTestEventsImplImpl's constructor, add the 'this' pointer to the list.  In
the destructor, remove the 'this' pointer from the list.  Then the server
can loop through the list when needed.


Gambit
Technical Details
Message-ID: <4363bf65$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.spamkiller.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43599303@newsgroups.borland.com> <43599f5f$1@newsgroups.borland.com> <435bbbf2$1@newsgroups.borland.com> <435bc353$1@newsgroups.borland.com> <435ea916$1@newsgroups.borland.com> <435eb30b@newsgroups.borland.com> <43636b7d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b9d755a2fd611a30
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: <43599303@newsgroups.borland.com> <43599f5f$1@newsgroups.borland.com> <435bbbf2$1@newsgroups.borland.com> <435bc353$1@newsgroups.borland.com> <435ea916$1@newsgroups.borland.com> <435eb30b@newsgroups.borland.com> <43636b7d@newsgroups.borland.com>
Subject: Re: sockets????
Date: Sat, 29 Oct 2005 11:28:43 -0700
Lines: 38
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: <4363bf65$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1130610533 68.69.17.41 (29 Oct 2005 11:28:53 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.spamkiller.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail