Skip to content

Commit

Permalink
events
Browse files Browse the repository at this point in the history
  • Loading branch information
gcphost committed May 15, 2016
1 parent 7180019 commit 6dff110
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Replace `/home/forge/app.com/` with the path to your application.
sudo cat <<EOF > /etc/supervisor/conf.d/laravel-ratchet.conf
[program:laravel-ratchet]
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/app.com/artisan ratchet:serve
command=php /home/forge/app.com/artisan ratchet:serve -q
autostart=true
autorestart=true
user=vagrant
Expand Down
5 changes: 0 additions & 5 deletions src/RatchetServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function onOpen(ConnectionInterface $conn)
$this->conn = $conn;

$this->attach()->throttle()->limit();

event('ratchetOpen', $this->conn);
}

private function attach()
Expand Down Expand Up @@ -143,7 +141,6 @@ private function isThrottled($conn, $setting)
public function onMessage(ConnectionInterface $conn, $input)
{
$this->console->comment(sprintf('Message from %d: %s', $conn->resourceId, $input));
event('ratchetMessage', [$conn, $input]);

if ($this->isThrottled($conn, 'onMessage')) {
$this->console->info(sprintf('Message throttled: %d', $conn->resourceId));
Expand All @@ -167,7 +164,6 @@ public function onClose(ConnectionInterface $conn)
{
$this->clients->detach($conn);
$this->console->error(sprintf('Disconnected: %d', $conn->resourceId));
event('ratchetClose', $conn);
}

/**
Expand All @@ -183,7 +179,6 @@ public function onError(ConnectionInterface $conn, \Exception $exception)
$message = $exception->getMessage();
$conn->close();
$this->console->error(sprintf('Error: %s', $message));
event('ratchetError', [$conn, $message]);
}

/**
Expand Down

0 comments on commit 6dff110

Please sign in to comment.