phpwebsocket is a server-side implementation of a WebSocket server using the PHP language. WebSocket is an API and a protocol for bi-directional, full-duplex communication that is closely associated with HTML5 and implemented in recent versions of most web browsers.
Questions tagged [phpwebsocket]
290 questions
6
votes
1 answer
PHP Ratchet Wamp Broadcast to subscribers on publish event
I am developing a web application where I need real time behavior for the following scenario,
Application will have two type of users Player and Spectator. Players can join an going game while Spectators can mere spectate.
A game will be…

hitesh israni
- 1,742
- 4
- 25
- 48
6
votes
1 answer
Ratchet / Websockets : How many clients subscribing to an object?
I would like to know how many clients are actually subscribing to a chatroom / conversation.
To be more precise, i just want to know if there is more than 1 client. (Chatroom are actually a private conversation between two users).
There is only one…

Brieuc
- 3,994
- 9
- 37
- 70
6
votes
2 answers
Creating/Managing private rooms using Ratchet?
I am making iOS chat application. After doing study on needed technology and protocols, I decided to give a websockets try. For reasons our stack top is php based and I came to know about ratchet as websockets for PHP. I made simple chat server for…

padam thapa
- 1,471
- 2
- 20
- 41
6
votes
2 answers
PHP Websocket on Webserver
A few days ago I setup this WebSocket server from http://code.google.com/p/phpwebsocket/
It works excellent on my localhost by using Xampp. Then, I uploaded it to my webspace on Strato, but now I am not able to connect to the server.
I changed the…

Silicium
- 435
- 8
- 18
6
votes
2 answers
Cannot get websocket connection to work in Chrome 19
I have a websocket client/server that works perfectly with Firefox and Chrome 18. It does not work with Chrome 19 beta. I suspect it is due to this browser now using a deflate-frame extension which my server doesn't support.
Chrome 19 beta is…

Aaron
- 136
- 1
- 6
5
votes
2 answers
Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp
I have implemented WebRTC for video-audio call through browser. I am using the latest adapter.js. I also implemented WebRTC for native android app too. My signaling server is based on php WebSocket(Ratchet websocket). When I'm testing my…

Mushfiqur Rahman
- 306
- 4
- 18
5
votes
0 answers
Missing Sec-WebSocket-Key in header
I try to run a websocket application (php-based chat) and need to get the Sec-WebSocket-Key out of the Handshake header I get by executing:
$socket_new = socket_accept($socket);
$header = socket_read($socket_new, 5000);
But the needed Attribute is…

zypro
- 1,158
- 3
- 12
- 33
5
votes
2 answers
How to send custom HTTP header in response?
I want to send json data in my HTTP Header.
I am using Codeigniter PHP, so I did this in my controller:
header('Content-Type: application/json');'
This is my code:
$request = array(
'request' => $_GET['request'],
'device_id' =>…

Rajan
- 2,427
- 10
- 51
- 111
5
votes
2 answers
Which is more efficient to send WebSocket updates with a MySQL database change
I'm currently experimenting with WebSockets in a bid to reduce / remove the need for constant AJAX requests in a potentially low bandwidth environment. All devices are WebSocket compliant so there's no issue there, and I'm trying to keep it to…

Duncan McArdle
- 501
- 5
- 14
5
votes
1 answer
how to constantly update the datatables when records change in the database, a websockets or long polling implementation
I am using datatables as my grid on a webapp. The problem is, the user has to refresh the page always to get the current data from the database,is there a way this can be done automatically? because several apps write to the same table and the…

indago
- 2,041
- 3
- 29
- 48
4
votes
1 answer
PHP server and websockets
I want to start using websockets to make a connection to a PHP socket server. This server should check at a certain interval if something has changed in the database and it should then send the changes back to the client. So when a client is…

w00
- 26,172
- 30
- 101
- 147
4
votes
4 answers
WebSocket Server using latest protocol (hybi 10)
I have browsed the forums here and this was the closest question I found:
How to (de)construct data frames in WebSockets hybi 08+?
The difference is that I am unable to get a successful handshake. I am assuming that framing doesn't play a roll until…

2bsharpdev
- 285
- 2
- 11
4
votes
1 answer
Trying to create a socket between servers with SocketIO and PHPws
I'm having a bit of an issue with websockets. So, I have a Rpi that provides me some data through a socketIO client in a pretty simple way. The following code shows how do I get to get this data:
SocketIO…

tul1
- 412
- 1
- 6
- 22
4
votes
0 answers
Symfony 3 WebSocketBundle PdoSessionHandler
That's how I setup the WebSocketBundle:
config.yml
gos_web_socket:
server:
port: 8080
host: localhost
client:
firewall: main
session_handler: session.handler.pdo
shared_config: true
And that's my services.yml:
services:
…

Nipec
- 41
- 1
4
votes
2 answers
How to understand, for which route a websocket message was sent by the client in a server?
I was building a server, and while trying to implement the websocket protocol, I ran into some problem.
As the question title describes, let's suppose I have defined two routes (/ws1, /ws2), which exposes multiple websocket connection.
And in case…

Ikari
- 3,176
- 3
- 29
- 34