2 distributed Ruby --- chat server
3 Copyright (c) 1999-2000 Masatoshi SEKI
11 def initialize(server, there)
15 @key = there.key = Time.now
21 @server.distribute(@there, str)
25 @there.message(@key, str)
37 client = ChatEntry.new(self, there)
39 @members[there] = client
44 def distribute(there, str)
45 name = @members[there].name
46 msg = "<#{name}> #{str}"
47 msg2 = ">#{name}< #{str}"
49 for m in @members.keys
52 @members[m].listen(msg2)
54 @members[m].listen(msg)
67 DRb.start_service(here, ChatServer.new)