Askedio\LaravelRatchet\RatchetServer::limit PHP Method

limit() private method

Limit connections.
private limit ( ) : [type]
return [type]
    private function limit()
    {
        if ($connectionLimit = config('ratchet.connectionLimit') && $this->connections - 1 >= $connectionLimit) {
            $this->console->info(sprintf('To many connections: %d of %d', $this->connections - 1, $connectionLimit));
            $this->conn->send(trans('ratchet::messages.toManyConnections'));
            $this->conn->close();
        }
        return $this;
    }