From 7df905c4d61c5fbb94dfe0ce507ccb2328157085 Mon Sep 17 00:00:00 2001 From: gymadarasz Date: Mon, 15 May 2017 03:11:44 +0100 Subject: [PATCH 1/3] resolve an include path --- websockets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websockets.php b/websockets.php index eb6a90e..9467482 100644 --- a/websockets.php +++ b/websockets.php @@ -1,7 +1,7 @@ Date: Wed, 17 May 2017 00:41:18 +0100 Subject: [PATCH 2/3] able to extender class to set tick speed --- websockets.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/websockets.php b/websockets.php index eb6a90e..42cf5c7 100644 --- a/websockets.php +++ b/websockets.php @@ -15,6 +15,9 @@ abstract class WebSocketServer { protected $headerOriginRequired = false; protected $headerSecWebSocketProtocolRequired = false; protected $headerSecWebSocketExtensionsRequired = false; + + protected $tv_sec = 1; + protected $tv_usec = 0; function __construct($addr, $port, $bufferLength = 2048) { $this->maxBufferSize = $bufferLength; @@ -86,7 +89,7 @@ public function run() { $write = $except = null; $this->_tick(); $this->tick(); - @socket_select($read,$write,$except,1); + @socket_select($read,$write,$except, $this->tv_sec, $this->tv_usec); foreach ($read as $socket) { if ($socket == $this->master) { $client = socket_accept($socket); From 551e27167435754c9f8433417b05708cebbd0a49 Mon Sep 17 00:00:00 2001 From: Gyula Madarasz Date: Wed, 17 May 2017 01:58:55 +0100 Subject: [PATCH 3/3] find users.php in same folder --- websockets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websockets.php b/websockets.php index bb9dd8e..47f665e 100644 --- a/websockets.php +++ b/websockets.php @@ -1,7 +1,7 @@