Article View: borland.public.cppbuilder.internet.socket
Article #3221Re: sockets????
From: Gary D
Date: Sat, 29 Oct 2005 12:15
Date: Sat, 29 Oct 2005 12:15
67 lines
3835 bytes
3835 bytes
This is the code that creates a server connection and fires the event ( in
the demo I was given nothing is done but to display a messagebox )
void __fastcall TClientWin::Button1Click(TObject *Sender)
{
FTestEventsImpl = CoTestEventsImpl::Create();
FEventSink.OnEvent1 = OnEvent1;
FEventSink.Connect(FTestEventsImpl);
FTestEventsImpl.Trigger();
}
//---------------------------------------------------------------------------
void __fastcall TClientWin::OnEvent1(BSTR* Message)
{
ShowMessage("Client Event Fired");
}
//---------------------------------------------------------------------------
The server is a blank window. It just appears(when the FTestEventsImpl =
CoTestEventsImpl::Create(); code executes? )
everything else is done in the COM library / Library table. ( right??)
I do not understand COM at all outside of intellectually knowing what it
does.
Borland is no help, I paid them like $2000.00 for tech support to have them
tell me I can't do what you say I can do.
PLEASE, can you tell me what to do to get the server to fire the OnEvent1 of
the client when the SERVER wants to
and not because the client asked? I understand that the client must connect
first to announce it self, but I don't understand
how to access the connection at the server's end once it is inplace. I have
tried for days and only became more frustrated.
"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:
<436367ef$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!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:15:01 -0500 Lines: 69 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: <436367ef$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130588143 66.38.101.139 (29 Oct 2005 05:15:43 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail