I am using simple WebSocket client program. It's working well until get
1006 for unknown reason...
$ua->websocket('ws://XXX/' => sub {
my ($ua, $tx) = @_;
print "WebSocket handshake failed!\n" and return unless $tx->is_websocket;
$tx->on(finish => sub {
my ($tx, $code, $reason) = @_;
print "WebSocket closed with status $code and reason $reason\n";
});
$tx->on(json => sub {
my ($tx, $hash) = @_;
print "WebSocket message via JSON:\n";
print Dumper($hash);
#$tx->finish;
});
$tx->send("START");
});
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
Last DEBUG report from library was:
-- Client <<< Server (http://XXX/)
\x81~7{XXX_SOME_JSON_HERE}
And then:
WebSocket closed with status 1006 and reason
CORE
Perl (v5.12.3, darwin)
Mojolicious (4.99, Top Hat)
OPTIONAL
EV 4.0+ (not installed)
IO::Socket::IP 0.20+ (not installed)
IO::Socket::SSL 1.84+ (not installed)
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.