Skip to content

Commit

Permalink
perfomance test
Browse files Browse the repository at this point in the history
  • Loading branch information
voldemar committed Mar 15, 2016
1 parent 47e0aaf commit b572f73
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public function start() {

while (true) {
//подготавливаем массив всех сокетов, которые нужно обработать
$read = $this->clients;
//$read[] = $service;
$read = array_slice($this->clients, 0, 1000);

stream_select($read, $write, $except, null);//обновляем массив сокетов, которые можно обработать

Expand All @@ -65,9 +64,10 @@ public function start() {
}
}

if (!empty($argv[1]) && $argv[1] == 'start' && !empty($argv[2]) &&
!empty($argv[3]) && $argv[3] >= 1 && $argv[3] <= 1000 &&
!empty($argv[4]) && $argv[4] >= 1 && $argv[4] <= 1000
if (!empty($argv[1]) && $argv[1] == 'start' &&
!empty($argv[2]) &&
!empty($argv[3]) && $argv[3] >= 1 &&
!empty($argv[4]) && $argv[4] >= 1
) {
$config = [
'websocket' => $argv[2],
Expand Down

0 comments on commit b572f73

Please sign in to comment.