代码错误
此投稿已在 6年前 合并。
内容修改:
| Old | New | Differences |
|---|---|---|
| 191 | 191 | $this->current_message_length = $payload_length; |
| 192 | 192 | $payload_type = 1; |
| 193 | 193 | echo $payload_length . "\n"; |
| 194 | } else if ($payload_length = | |
| 194 | } else if ($payload_length == 126) { | |
| 195 | 195 | $payload_type = 2; |
| 196 | 196 | $this->current_message_length = ((ord($buffer[2]) & 0xff) << 8) | (ord($buffer[3]) & 0xff); |
| 197 | 197 | echo $this->current_message_length; | … | … |
| 222 | 222 | ``` |
| 223 | 223 | 当payload_length的长度小于125的话,数据长度就等于片段长度。 |
| 224 | 224 | ``` |
| 225 | if ($payload_length = | |
| 225 | if ($payload_length == 126) { | |
| 226 | 226 | $payload_type = 2; |
| 227 | 227 | $this->current_message_length = ((ord($buffer[2]) & 0xff) << 8) | (ord($buffer[3]) & 0xff); |
| 228 | 228 | echo $this->current_message_length; |
关于 LearnKu