🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: sockets????

#3264
From: Remy Lebeau (TeamB)
Date: Tue, 01 Nov 2005 06:46
52 lines
3584 bytes
"Gary D" <gcdesroches@nctc.com> wrote in message 
news:4366d403@newsgroups.borland.com...

> I added the code for the TTheadList and got it to compile
> without a problem. I still can not call Trigger(); from the server side.

Then you are still not using it properly.  Please show your actual code. 
This is not that hard to implement.  I've already given you the pieces for 
it.  And I know it works because I use it all the time in my own COM 
servers.

> It IS public as you said but it is part of the COM class which I am 
> assuminig means I need to have an instance of the class on the
> server side to be able to access Trigger() from.  MyClass->Trigger(); ??

Of course you do, and you do have such an instance available.  Everytime the 
COM object is instantiated by a client, an instance of your class is created 
on the server side.  That is the whole purpose of the list code I gave you - 
so that your server code has access to all active instances of the class.

> I can get instances of the Implementation but get access violations if I
> try to use it or the server will just lock up.

Then you re not using it correctly.

> calling Trigger() outside the class will simply not compile.
> I get not a member errors etc.

Then you are not accessing it correctly.

> I looked at the client side and see that there is this:
>
>     FEventSink.OnEvent1 = OnEvent1;
>     FEventSink.Connect(FTestEventsImpl);
>
> but I don't know how it works

You did not read the articles I pointed you to, did you?  The client's Sink 
is implemented in terms of the IConnectionPoint interface.  Connect() 
queries the COM object for the IConnectionPointContainer interface, and from 
that then obtains the IConnectionPoint interface for your events.  The 
client then calls IConnectionPoint::Advise(), which psses an IDuspatch 
interface to your server.  On the server side, every time you call one of 
the Fire_...() methods, the client's IDispatch::Invoke() method is called, 
specifying the ID and parameters of the fired event.  All of this is handled 
transparently for you.  The only thing you have to concern yourself with in 
your own code is connecting the Sink to the client side object, and then 
calling the desired Fire_...() methods on the server side.


Gambit 
Technical Details
Message-ID: <43670f39$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!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> <436367ef$1@newsgroups.borland.com> <4363be5e$1@newsgroups.borland.com> <4366d403@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> <436367ef$1@newsgroups.borland.com> <4363be5e$1@newsgroups.borland.com> <4366d403@newsgroups.borland.com>
Subject: Re: sockets????
Date: Mon, 31 Oct 2005 22:46:18 -0800
Lines: 54
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; Response
NNTP-Posting-Host: 68.69.17.41
Message-ID: <43670f39$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1130827577 68.69.17.41 (31 Oct 2005 22:46:17 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail