Created
November 27, 2008 05:10
-
-
Save typester/29685 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Service::Chat; | |
use Moose; | |
extends 'Kamaitachi::Service'; | |
with qw/Kamaitachi::Service::AutoConnect | |
Kamaitachi::Service::Broadcaster | |
/; | |
sub on_invoke_send { | |
my ($self, $session, $req) = @_; | |
my $msg = $req->args->[1]; | |
my $res = $self->notify_packet( onMessage => $msg ); | |
$self->broadcast( $session => $res ); | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment