Skip Menu |

This queue is for tickets about the Net-Async-WebSocket CPAN distribution.

Report information
The Basics
Id: 79202
Status: resolved
Priority: 0/
Queue: Net-Async-WebSocket

People
Owner: Nobody in particular
Requestors: qwr [...] au.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: 0.05



Subject: send_frame not compatible with masked messages
Date: Fri, 24 Aug 2012 22:31:26 +0200
To: bug-Net-Async-WebSocket [...] rt.cpan.org
From: qwr <qwr [...] au.ru>
Net::Async::Protocol::send_frame is not compaible with "masked" messages used in newer versions of websocket implementations. Protocol::WebSocket::Frame has a support for that. Net::Async::Protocol::send_frame sends Protocol::WebSocket::Frame->new( $frame )->to_bytes instead of Protocol::WebSocket::Frame->new( buffer => $frame, masked => 1 )->to_bytes an example is blockchain.info websockets implementation: https://blockchain.info/api/api_websocket I would make a proposal either just to add hardcoded masked param like above or to pass whole @_: sub send_frame { my $self = shift; $self->write( Protocol::WebSocket::Frame->new( @_ )->to_bytes ); } and let user define masked param. mmx
On Fri Aug 24 16:32:14 2012, qwr@au.ru wrote: Show quoted text
> I would make a proposal either just to add hardcoded masked param like > above or to pass whole @_: > > sub send_frame > { > my $self = shift; > > $self->write( Protocol::WebSocket::Frame->new( @_ )->to_bytes ); > }
That looks simple enough; I suspect that's the right approach. I'll put that in now. -- Paul Evans
Should now be fixed in 0.05 -- Paul Evans