Article View: borland.public.cppbuilder.internet.socket
Article #3222Re: sockets????
From: Gary D
Date: Sat, 29 Oct 2005 12:30
Date: Sat, 29 Oct 2005 12:30
58 lines
3193 bytes
3193 bytes
Let me ask a more specific question...
This is the Trigger() code in the server:
STDMETHODIMP TTestEventsImplImpl::Trigger()
{
WideString strName;
bool Fire_The_Event = true;
if ( Fire_The_Event == true )
Fire_Event1(&strName);
return S_OK;
}
The bool Fire_The_Event = 1; if( Fire_The_Event == ??? ) is supposed to show
that if Fire_The_Event is true the event fires and if not it won't.
I get that.
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?
( and accept new connections ) I can't figure out how to access Trigger()
inside the Server Code at all, let alone get an instance of it
that has active connection(s) to the client(s).
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:435eb30b@newsgroups.borland.com...
>
> "Gary D" <gcdesroches@nctc.com> wrote in message
> news:435ea916$1@newsgroups.borland.com...
>
>> Why can't the server just call Trigger() itself? // NOTE: Trigger
>> is the function that the server owns that responds to client requests.
>
> The server *CAN* call Trigger() whenever it needs to. Trigger() can then
> call the Fire_...() method for whichever event(s) its wants to, and those
> events will be called in the client's event sink.
>
>> and the answer came back:
>
> Borland's answer is completely wrong. Servers *DO* have that kind of
> logic
> available. Connection Points are designed exactly to handle the kind of
> Push model that Borland says servers can't have. I know it works because
> I
> have several COM servers that push unsolicited events to clients in
> response
> to external triggers (hardware events, file changes, etc). Also, it is
> possible to design a COM server inside an NT service, such that the COM
> server *IS* executing code on its own without having any clients connected
> at all.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<43636b7d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<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>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b9d755a2fd611a30 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Gary D" <gcdesroches@nctc.com> From: "Gary D" <gcdesroches@nctc.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> Subject: Re: sockets???? Date: Sat, 29 Oct 2005 07:30:11 -0500 Lines: 60 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 66.38.101.139 Message-ID: <43636b7d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130589053 66.38.101.139 (29 Oct 2005 05:30:53 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail