Skip to content
This repository was archived by the owner on Aug 25, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Engine/AbstractSocketIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public function read()

// the second byte contains the mask bit and the payload's length
$data .= $part = fread($this->stream, 1);
$length = (int) (bin2hex($part) & ~0x80); // removing the mask bit
$mask = (bool) (bin2hex($part) & 0x80);
$length = hexdec(bin2hex($part) & ~0x80); // removing the mask bit
$mask = (bool)(bin2hex($part) & 0x80);

/*
* Here is where it is getting tricky :
Expand Down