Help for this page

Select Code to Download


  1. or download this
    use Mojo::IOLoop;
    my $clients = {};
    ...
        my $time = eval { $last_message->{time} };
        return $messages, $time;
    }
    
  2. or download this
    20:15     ghandi     Hi There! I've been playing around with the Mojo 
    +WebSocket Chat-Example from https://github.com/kraih/mojo/wiki/Writi&
    +#8203;ng-websocket-chat-using-Mojolicious-Lite
    20:15         And now i'm wondering: Do i realy need to keep track of 
    +the clients myself in %clients? Wouldn't it be cooler to just use a c
    +ustom event that i emit on a new incoming message?
    20:16     gtodd     hmm
    ...
    20:33     ghandi     sri: Mojo::Redis looks interesting. So just to ge
    +t something right: The Mojo-Event-System is Process-Based, right? Whi
    +ch means: Client A on $PID 1 can't talk to Client B on $PID 2?
    20:34     sri     that's how everything in perl works
    20:35     ghandi     Ok, thanks ;)