se. See https://github.com/plicease/AnyEvent-WebSocket-Client/issues/30
use AnyEvent::HTTP;
use JSON;
=head1 NAME
Centrifugo::Client
=head1 SYNOPSIS
use Centrifugo::Client;
use AnyEve
infoRef->{version};
}) -> on('message', sub{
my ($infoRef)=@_;
print "MESSAGE: ".encode_json $infoRef->{data};
}) -> connect(
user => $USER_ID,
timestamp => $TIMESTAMP,
token =>
my ($this, $body) = @_;
$this->_debug( "Centrifugo::Client : Connected to Centrifugo : ".encode_json $body );
# on Connect, the client_id must be read (if available)
if ($body && ref($body) eq