public function checkSocket($socket)
    {
        $read = [$socket];
        // loop through the sockets
        if (count($this->client) > 0) {
            for ($i = 0; $i < $this->max_clients; $i++) {
                if (isset($this->client[$i]) && $this->client[$i]['sock'] != null) {
                    $read[$i + 1] = $this->client[$i]['sock'];
                }
            }
        }

        return $read;
    }