29 lines
623 B
PHP
29 lines
623 B
PHP
<?php
|
|
|
|
namespace BeyondCode\LaravelWebSockets;
|
|
|
|
use Exception;
|
|
use Ratchet\ConnectionInterface;
|
|
use Ratchet\RFC6455\Messaging\MessageInterface;
|
|
use Ratchet\WebSocket\MessageComponentInterface;
|
|
|
|
class WebSocketController implements MessageComponentInterface
|
|
{
|
|
function onOpen(ConnectionInterface $connection)
|
|
{
|
|
dump("Client connected");
|
|
}
|
|
|
|
public function onMessage(ConnectionInterface $connection, MessageInterface $message)
|
|
{
|
|
}
|
|
|
|
|
|
function onClose(ConnectionInterface $connection)
|
|
{
|
|
}
|
|
|
|
function onError(ConnectionInterface $connection, Exception $exception)
|
|
{
|
|
}
|
|
} |