All Questions
22
questions
2
votes
0
answers
288
views
how to send message to specific one user id using ratchet Laravel?
chat.php how to send message to specific user id?
public function onMessage(ConnectionInterface $from, $msg)
{
$numRecv = count($this->clients) - 1;
echo sprintf('Connection %d sending ...
0
votes
1
answer
622
views
How to use PHP Laravel Binance web sockets?
In Laravel I made a test command and following this example implemented websocket client. It runs fine, but I am clueless how to launch it on server.
Controller? Does it keep running after page is ...
1
vote
1
answer
383
views
Chat with WSS on AWS Lightsail
I built chat functions with Ratchet/Laravel.
It works well on local I figured out the SSL too.
Websocket with laravel
But after deploying on AWS/Lightsail, WSS is not working.
I think there is some ...
1
vote
1
answer
524
views
How to customize Laravel websockets connections (via handler)
I use laravel websockets package (Beyondcode pusher replacement) with Laravel echo and everything is working as expected. What i am trying to achieve is to customize my connections - to check when ...
0
votes
2
answers
135
views
Accessing Eloquent ORM inside Ratchet's MessageComponentInterface
The title is confusing. Basically, I'm unable to access Laravel's utilities in classes that don't belong to the framework.
Error is: Call to a member function connection() on null in C:\xampp\htdocs\...
5
votes
0
answers
507
views
How to access Laravel Auth in Ratchet
I found a post on Laravel.io on how to load Laravel sessions into Ratchet which is outdated and uses Laravel 5.4 so I've altered a few things to get this to work with Laravel 8.x
public function ...
0
votes
0
answers
267
views
Deploy Laravel Vue app with ratchet websockets
I have an application that works with web sockets. In development, I created a console command that starts the socket server. I deployed the application, using the cpanel, how can I run my console ...
1
vote
1
answer
80
views
Returning an array in onOpen function
I am currently writing a chat application. So far users can send each other messages and I am able to store the messages in my database. Now I want to show the messages which are stored in the ...
3
votes
1
answer
3k
views
Sending messages to a specific user with Laravel-Websockets (One to One chat)
I have a websocket group chat in my app which broadcasts user's message to all the other users. I want to make a one on one chat also which will broadcast messages to two sides only. How can I tell ...
0
votes
0
answers
66
views
Why my Ratcher Server on Laravel is not working?
When I try to connect with my Ratchet Server on Laravel Firefox say " cannot connect with server ws://localhost:8080/."
I used askedio/laravel-ratchet package
There is my config:
'class' ...
0
votes
1
answer
1k
views
Websocket data refresh at certain time interval
we are using websocket between two pages:
page1: users who are doing actions
page2: moderator who is moderating user data
we want to refresh the page2 moderation data at every 5 seconds using ...
0
votes
1
answer
479
views
Argument 1 passed to Ratchet\Session\SessionProvider::__construct() must implement interface Ratchet\Http\HttpServerInterface
I'm trying to use sessionProvider in Ratchet, the following is my shell script:
namespace App\Console\Commands;
use Ratchet\Session\SessionProvider;
use Illuminate\Console\Command;
use Ratchet\...
0
votes
1
answer
658
views
Running Cboden Ratchet Websocket on the server
I made a chat service on my local machine and successfully ran it.
This chat service uses cboden retchat library and the custom JS on frontend.
So I uploaded everything on the CENTOS server and tried ...
1
vote
0
answers
559
views
"This server only speaks WebSocket subprotocols wamp.2"
I am trying to subscribe to a channel of an api. I tried using 'ratchetphp/Pawl' and Laravel and this is my code:
$loop = Factory::create();
$connector = new Connector($loop);
$connector(...
0
votes
1
answer
2k
views
Laravel: Run Custom Artisan Command in Background
I'm working on a chat application using the Ratchet package.
How can I run command "chat:serve" on Shared Hosting? I need to run command without console line.
I tried this:
Artisan::call('chat:serve'...