Ratchet icon indicating copy to clipboard operation
Ratchet copied to clipboard

Cakephp specific implementation

Open Konsultea opened this issue 4 years ago • 2 comments

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

Konsultea avatar Aug 10 '20 11:08 Konsultea

I am not sure what you are asking here. Can you explain further?

tylerlazenby avatar Mar 12 '21 15:03 tylerlazenby

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

Konsultea avatar Mar 16 '21 08:03 Konsultea