Skip to content

Commit

Permalink
Merge pull request #19 from francislavoie/patch-2
Browse files Browse the repository at this point in the history
Make RatchetWsServer functions protected
  • Loading branch information
gcphost authored Feb 7, 2018
2 parents 87b28e4 + 8d4077e commit 9e8478b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/RatchetWsServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function onOpen(ConnectionInterface $conn)
$this->attach()->throttle()->limit();
}

private function attach()
protected function attach()
{
$this->clients->attach($this->conn);
$this->console->info(sprintf('Connected: %d', $this->conn->resourceId));
Expand All @@ -84,7 +84,7 @@ private function attach()
*
* @return [type] [description]
*/
private function throttle()
protected function throttle()
{
if ($this->isThrottled($this->conn, 'onOpen')) {
$this->console->info(sprintf('Connection throttled: %d', $this->conn->resourceId));
Expand All @@ -101,7 +101,7 @@ private function throttle()
*
* @return [type] [description]
*/
private function limit()
protected 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));
Expand All @@ -120,7 +120,7 @@ private function limit()
*
* @return bool [description]
*/
private function isThrottled($conn, $setting)
protected function isThrottled($conn, $setting)
{
$connectionThrottle = explode(':', config(sprintf('ratchet.throttle.%s', $setting)));

Expand Down

0 comments on commit 9e8478b

Please sign in to comment.