From: "Jérôme Hauss" Date: 2003-06-18T21:22:12+09:00 Subject: DRbObservable : delete_observer ; clients shutdown ? This is a multi-part message in MIME format. ------=_NextPart_000_0402_01C335A4.899E0890 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi the list, Has anyone already used DRbObservable ? I am writing a server. When a = client calls the server, all others clients are informed of the action. = DRbObserver.add_observer works fine, no problem with notify either. But = I cannot remove one client from the observers list. And I cannot achieve making the server detect when one client was = shutdown... It seems the rescue part of DRbObservable module in = drb/observer.rb is never processed. I am on Windows 2000 (maybe problems come from the OS), with Ruby 1.8.0 = (I know it is not a stable version, but it's preconfigured when = installing) and DRb-2.0.3. Thanks in advance for any hint. J=E9r=F4me HAUSS class Server include DRb::DRbObservable def subscribe(client) ... add_observer(client) ... end def unsubscribe(client) ... delete_observer(client) ... end end class Client include DRb::DRbUndumped end aServer.subscribe(aClient) ... aServer.unsubscribe(aClient) ------=_NextPart_000_0402_01C335A4.899E0890 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi the list,
 
Has anyone already used DRbObservable ? = I am=20 writing a server. When a client calls the server, all others clients are = informed of the action. DRbObserver.add_observer works fine, no problem = with=20 notify either. But I cannot remove one client from the observers=20 list.
And I cannot achieve making the server = detect when=20 one client was shutdown... It seems the rescue part of DRbObservable = module in=20 drb/observer.rb is never processed.
 
I am on Windows 2000 (maybe problems = come from the=20 OS), with Ruby 1.8.0 (I know it is not a stable version, but it's = preconfigured=20 when installing) and DRb-2.0.3.
 
 
Thanks in advance for any = hint.
J=E9r=F4me HAUSS
 
 
 
 
class Server
include DRb::DRbObservable
 
def subscribe(client)
   ...
   = add_observer(client)
   ...
end
 
 
def unsubscribe(client)
   ...
   delete_observer(client)
   ...
end
 
end
 
 
 
 
class Client
include = DRb::DRbUndumped
end
 
 
aServer.subscribe(aClient)
...
aServer.unsubscribe(aClient)
 
 
------=_NextPart_000_0402_01C335A4.899E0890--