Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Frame: remove fin() accessor from documentation and test. If a messag…
Browse files Browse the repository at this point in the history
…e is fragmented, the return value of fin() is meaningless anyway. Plus, probably current implementation does not handle fin flags if control frames are injected in non-control fragments. If we want fin() accessor, the test for that case is necessary.
  • Loading branch information
debug-ito committed Oct 10, 2013
1 parent 81adfea commit f5975d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
7 changes: 0 additions & 7 deletions lib/Protocol/WebSocket/Frame.pm
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,6 @@ Check if frame is a pong response.
Check if frame is of close type.
=head2 C<fin>
$fin = $frame->fin;
$frame->fin(0);
Get/set "fin" flag.
=head2 C<opcode>
$opcode = $frame->opcode;
Expand Down
12 changes: 1 addition & 11 deletions t/draft-ietf-hybi-17/frame.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use warnings;

use utf8;

use Test::More tests => 93;
use Test::More tests => 88;

use Encode;

Expand Down Expand Up @@ -135,16 +135,6 @@ ok $@;
$f = Protocol::WebSocket::Frame->new(buffer => 'Hello', fin => 0);
is $f->to_bytes => pack('H*', "010548656c6c6f");

# get/set fin flag
$f = Protocol::WebSocket::Frame->new(buffer => 'Hello');
ok $f->fin;
$f->fin(0);
ok !$f->fin;
is $f->to_bytes => pack('H*', "010548656c6c6f");
$f->fin(1);
ok $f->fin;
is $f->to_bytes => pack('H*', "810548656c6c6f");

# continuation frame
$f = Protocol::WebSocket::Frame->new(buffer => "Hello", type => "continuation");
is $f->to_bytes => pack('H*', "800548656c6c6f");
Expand Down

0 comments on commit f5975d6

Please sign in to comment.