Skip to content
Advertisement

Tag: websocket

php server socket & webSocket HTML5 client

what i’m trying is connect the client [webSocket] with PHP server socket my server socket will accept the socket from client, and fetch the Request headers, after receiving the Request, i sent back handshake [response] But the status for webSocket [client] is pending and never get the response JS code: and my PHP server Socket: handshake function: After sending the

PHP Websocket Client – Keep connection open

I am using PHP-WSS in a laravel application and need to keep a websocket client open to receive various messages from the websocket server. So far I built a CLI php script that I can execute and wait for messages to arrive. I built the following function to test… The question is, to keep the connection open for any messages

PHP socket_read waits for data to read

I’m new to socket stuff, here is my piece of code: client read method is just: Nothing will be executed after $status = $this->client->read(), untill socket_read() reads new data. I would like to stop socket_read() acting like waiting for data to read or call socket_read() only when there is any data to read. I couldn’t get any idea, how to

Php Show Online Users with Pusher or socket.io

I have a forum page. On the only index page, I show an online user list that shows usernames. I use Pusher. It works great. I have a problem about which my customer is complaining. The problem is that when a user browses to other pages, his/her username disappears and re-appears again. His/her connection to Pusher is lost on every

How to get room id in laravel broadcast channel.php

Here is my js Here is PersonalChat.php Here is My channels.php I asked my question in my channels.php and PersonalChat.php Again May I say My question is ** How to get room id ** in channels.php and PersonalChat.php Thank you all Sorry for my english skill Answer you can accept param in channel.php like {roomId} then in call back you

Laravel websocket cant connect to pusher ERR_CERT_AUTHORITY_INVALID

I have a laravel application with websockets. I already setup all the needs for the websocket and pusher config. But whenever I test my broadcast channel I got app.js:58283 WebSocket connection to ‘wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false’ failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID When i do some reload. sometimes i get app.js:55791 WebSocket connection to ‘wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false’ failed: WebSocket is closed before the connection is

Advertisement