Using the Remoting Events sample for from Ingos book, I managed to get a
quick and dirty little chat app running. Now I want to change the server a
bit so it looks more like my real world application. I created a class
directly in the server app that uses a timer to call the BroadcastMessage()
method. If I load the Server and then start the EventListener project, the
server never seems pick up is a new event listener. If I then start up the
EventInitiator project and broadcast a a message, it works and the server
broadcasts it out to the EventListener, so I am not sure why me just calling
the BroadcastMessage() method directly in the server doe not also broadcast.
Any ideas?
Thanks!
Devin
Allen Anderson - 25 Jun 2004 15:51 GMT
because your not getting the same version of the object most likely.
If you are just 'newing' a new instance of the broadcaster then its
not the same one that other clients have connected to. A good way
aroudn this is to create the remoting object locally with new, the
'marshal' the object into remoting. This way you have the local
reference to the object as well as the remote object up and running.
When you call broadcast on that object it should act as desired.
Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com
>Using the Remoting Events sample for from Ingos book, I managed to get a
>quick and dirty little chat app running. Now I want to change the server a
[quoted text clipped - 11 lines]
>
>Devin