Re: Events in .Net Remoting
- From: vsapre80@xxxxxxxxx
- Date: 6 Jul 2005 12:39:13 -0700
Thanks for the reply. I think I have got the thing working...but with a
different workarround.
I was already doing the same as suggested by you i.e. opening up a new
channel for the callback to be sent on the client and also specifying
that the client will allow callbacks to come on any open port (port:0).
My architecture was such:
(Client) <-- .Net Remoting --> (Server)<---->(RemoteObject.dll)
to send an event, the server needs to know what is the type of event
handler at the clients end. This might entail giving a reference of the
client exe to the server, or worse copying the client where the server
stays. To circumvent this, the article that I was using had suggested
to have the the event handler at the client's end as a derived from
another remotable class (which is itself derived from
MarshalByRefObject) that has a virtual funtion, whose signature and
return type matches that of the delegate set up for the event handling.
This virtual funtion is then implemented at the client side to do the
event handling.
The deal here was that the base class (from which the event handler
derives) must also be explicitly visible to the RemotableObject. Though
it anyway lives in the RemoteObject.dll, it should be made visible by
including the header file of that class.
After I did that...it started working fine.
I will post more questions as they come up. Thanks for the reply
again...
.
- References:
- Events in .Net Remoting
- From: vsapre80
- Re: Events in .Net Remoting
- From: Christopher Schipper
- Events in .Net Remoting
- Prev by Date: Remoting and application domains
- Next by Date: Trying use interface on client instead of served class
- Previous by thread: Re: Events in .Net Remoting
- Next by thread: Re: Events in .Net Remoting
- Index(es):
Relevant Pages
|