Websocket Run In Console Mode With Controller/action Call

I have created web application with yii framework, now i want to integrate websocket in this application. I can not find any web socket extension. So I put websocket class in component folder and run websocket file using console application.

But I want to call some controller/action file which i have already created. In controller i have used user login and all those functionality. So i want to use those functionality via websocket using json-rpc call. I already converted all controller in json-rpc call.

I can not call browser controller/action from console application.

Can you guys please help me to solve out this problem using console? Because websocket need to call from command line console.

You can suggest me other way to solve out this problem.

Your help would be appreciated.

I assume you’re listening to the socket. That means you’re always in CLI mode and that web application controllers are basically not available. You have to use console commands instead.