Ratchet
Ratchet copied to clipboard
Cakephp specific implementation
Hi to the community,
I got totally confused while trying to use ratchet websocket in cakephp 4.
Confused with the namespaces and “use”.
Server in bin folder with the following:
use Ratchet\Server\IoServer; use Ratchet\Http\HttpServer; use Ratchet\Websocket\WsServer; use App\Websocket;
Websocket is in the src folder with following (websocket.php)
namespace App; use Ratchet\MessageComponentInterface; use Ratchet\ConnectionInterface;
All is up and running, message got delivered and received.
NOW THE ISSUE, I want of course to use the regular controllers inside the websocket class.
Could you please help with namespace, use, appcontroller to get to use the controllers, tableregistry and other… in the websocket class (which is inside the Websocket.php in the src folder)
Thanks in advance for help. Kind regards Lou
I am not sure what you are asking here. Can you explain further?
Hi, Just how to implement ratchet/cakephp 4 , got confused on namespace, at the end could not get it to work... never found any clear integration tutorial