Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub webleg{
- my $self = shift;
- print "Client connected\n";
- my $user = $self->session('login');
- my $connection = $self->tx->connection;
- if($self->tx->is_websocket)
- {
- print "this is a websocket transaction\n";}
- $self->send_message( "Congratulations $user, your Mojo is working your connect id is $connection !");
- my $tx = $self->tx->connection($connection);
- if($tx->is_websocket){
- print "The returned transaction is a websocket\n";
- }else
- {print "The returned transaction is not a websocket\n";}
- }
- output:
- Client connected
- this is a websocket transaction
- The returned transaction is not a websocket
- Shouldn't the returned transaction be a websocket class?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement