Olie 2007-04-16 03:02:45
I startted off by using TCPChannel but this caused me several problems
the most serious being that if someone disconnected the network cable
my local app would stop working. So I decided to change to IPCChannels
thinking that it would just slot in and work as before. Mostly this is
what has happened exept with events.
All is fine when you have a simple client server relationship, however
when you add a second client the events stop working. I have an event
publishing mechanism that deals with the problems of remotting and
events. The problem is that when the second client connects all the
handlers that have registered for the event seem to get destroyed and
it is as if the event is empty.
Any ideas on what this might be?
Olie 2007-04-16 03:02:54
After more investigation, when you start the second client the first
call to the first Client in the invocation list succeeds but after that
they all fail with “Requested Service not Found!”.
Michael belmon 2007-04-16 07:53:36
try to change the “portName” attribute for your second client…
Olie 2007-04-16 07:53:53
Thanks Micheal! All works well now!
Does raise the question of how do you know what name to give the port,
as you need to know whether another client exists. For the moment I
just generate a random string to add to the port name. Lets hope they
are never the same random string!
Maybe if I read the documentation I will find a function
“GetUniquePortName”, or maybe not.