From: Benoit Daloze Date: 2009-11-25T08:04:43+09:00 Subject: DRb::DRbObject.alive? --0016e65aed2c8a51dd047925f762 Content-Type: text/plain; charset=ISO-8859-1 Hi, I found a feature that seem to be missing to me in DRb. I'm just creating a chat with a client and a server, using only DRb to interact between them. My problem is I didn't found a nice way to verify if a client is alive. I would like to be able to update my clients' list, but I need to know if they are alive. Currently, I'm getting around with catching the Exception DRb::DRbConnError, but that looks really ugly: @clients.each { |c| begin c.respond_to?(:some_method_defined_in_client) #Trying to use any method of c will raise the exception (except if not defined) rescue DRb::DRbConnError @clients.delete(c) end } Using Exceptions would be meaningful when I try to send(it would raise the exception if I call #send), but then I would have to manage Exceptions everywhere. The method alive? is defined for the DRbServer and DRbTCPSocket, but not for DRbObject! (in fact if the Client just got disconnected, alive? will still return true) Does somebody already met this? (And does somebody knows what DRb is?^^ Please have a look it's pretty cool, but the documentation could even be better...) Benoit --0016e65aed2c8a51dd047925f762--