PDA

View Full Version : DRb Foo



Alorn15
06-06-2010, 06:33 PM
The best guide I've found is here:
http://segment7.net/projects/ruby/drb/introduction.html

Here is an example within the context of lich. I don't guarantee this code runs - I certainly didn't try it - but it should basically correct example of two-way communication (where a cast command is sent to a client, and rt could be checked by the server if you wanted.)

There may be one additional step necessary... Even though MyGroup is an undumped object, Array isn't. So I'm wondering if you would have to explicitly add getter/setter methods for accessing @members. You kind of want to anyway to catch exceptions, or the server will croak when any client does.

Server
http://pastebin.com/rQ2Z1EYM

Client
http://pastebin.com/bvMm2HsL