This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace BeyondCode\LaravelWebSockets\Test\Handlers; | ||
|
||
use Exception; | ||
use Ratchet\ConnectionInterface; | ||
use Ratchet\RFC6455\Messaging\MessageInterface; | ||
use Ratchet\WebSocket\MessageComponentInterface; | ||
|
||
class TestHandler implements MessageComponentInterface | ||
{ | ||
public function onOpen(ConnectionInterface $connection) | ||
{ | ||
$connection->close(); | ||
} | ||
|
||
public function onClose(ConnectionInterface $connection) | ||
{ | ||
// | ||
} | ||
|
||
public function onError(ConnectionInterface $connection, Exception $e) | ||
{ | ||
dump($e->getMessage()); | ||
} | ||
|
||
public function onMessage(ConnectionInterface $connection, MessageInterface $msg) | ||
{ | ||
dump($msg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters