mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
29
app/WebSockets/Socket.php
Normal file
29
app/WebSockets/Socket.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\WebSockets;
|
||||
|
||||
use Ratchet\ConnectionInterface;
|
||||
use Ratchet\RFC6455\Messaging\MessageInterface;
|
||||
use Ratchet\WebSocket\MessageComponentInterface;
|
||||
|
||||
class Socket implements MessageComponentInterface
|
||||
{
|
||||
public static $connections = [];
|
||||
|
||||
public function onOpen(ConnectionInterface $connection)
|
||||
{
|
||||
self::$connections[] = $connection;
|
||||
}
|
||||
|
||||
public function onMessage(ConnectionInterface $from, MessageInterface $msg)
|
||||
{
|
||||
}
|
||||
|
||||
public function onClose(ConnectionInterface $connection)
|
||||
{
|
||||
}
|
||||
|
||||
public function onError(ConnectionInterface $connection, \Exception $e)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user