Parcourir la source

Websocket - outgoing PING packets, now this packet contains MASK.
According to Section 5.2 of the specification, all frames from client to server have the mask bit set to 1.

Vitaliy Ponomarev il y a 8 ans
Parent
commit
ea04a07d29
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Protocols/Ws.php

+ 1 - 1
Protocols/Ws.php

@@ -412,7 +412,7 @@ class Ws
             // Headbeat.
             if (!empty($connection->websocketPingInterval)) {
                 $connection->websocketPingTimer = Timer::add($connection->websocketPingInterval, function() use ($connection){
-                    if (false === $connection->send(pack('H*', '8900'), true)) {
+                    if (false === $connection->send(pack('H*', '898000000000'), true)) {
                         Timer::del($connection->websocketPingTimer);
                         $connection->websocketPingTimer = null;
                     }