Permalink
Browse files

use Tatsumaki to display VERSION

  • Loading branch information...
1 parent 06ca320 commit 52252a2774a5dcb0cbc76166d709c8dedef8dd41 @miyagawa committed Nov 26, 2009
Showing with 6 additions and 0 deletions.
  1. +1 −0 eg/chat/app.psgi
  2. +5 −0 lib/Tatsumaki/MessageQueue.pm
View
@@ -1,5 +1,6 @@
use strict;
use warnings;
+use Tatsumaki;
use Tatsumaki::Error;
use Tatsumaki::Application;
use Time::HiRes;
@@ -14,6 +14,10 @@ our $BacklogLength = 30; # TODO configurable
my %instances;
+sub channels {
+ values %instances;
+}
+
sub instance {
my($class, $name) = @_;
$instances{$name} ||= $class->new(channel => $name);
@@ -108,6 +112,7 @@ sub poll_once {
sub poll {
my($self, $client_id, $cb) = @_;
+ # TODO register client info like names and remote host in $client
my $cv = AE::cv;
$cv->cb(sub { $cb->($_[0]->recv) });
my $s = $self->clients->{$client_id} = {

0 comments on commit 52252a2

Please sign in to comment.