src/Components/WSClientTrait.php 1 location
|
@@ 229-231 (lines=3) @@
|
226 |
|
if ($masked) { |
227 |
|
// generate a random mask: |
228 |
|
$mask = ''; |
229 |
|
for ($i = 0; $i < 4; $i++) { |
230 |
|
$mask .= chr(random_int(0, 255)); |
231 |
|
} |
232 |
|
$frame .= $mask; |
233 |
|
} |
234 |
|
|
src/Components/Connection.php 1 location
|
@@ 175-177 (lines=3) @@
|
172 |
|
// generate a random mask: |
173 |
|
$mask = []; |
174 |
|
if ($masked === true) { |
175 |
|
for ($i = 0; $i < 4; $i++) { |
176 |
|
$mask[$i] = chr(random_int(0, self::MASK_255)); |
177 |
|
} |
178 |
|
|
179 |
|
$frameHead = array_merge($frameHead, $mask); |
180 |
|
} |