Questions tagged [phpwebsocket]

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.

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…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/node.js" class="post-tag grid--cell" title="show questions tagged 'node.js'" rel="tag">node.js</a> <a href="../../questions/tagged/apache" class="post-tag grid--cell" title="show questions tagged 'apache'" rel="tag">apache</a> <a href="../../questions/tagged/socket.io" class="post-tag grid--cell" title="show questions tagged 'socket.io'" rel="tag">socket.io</a> <a href="../../questions/tagged/phpwebsocket" class="post-tag grid--cell" title="show questions tagged 'phpwebsocket'" rel="tag">phpwebsocket</a> <a href="../../questions/tagged/phpws" class="post-tag grid--cell" title="show questions tagged 'phpws'" rel="tag">phpws</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 29 '17 at 10:46">asked Aug 29 '17 at 10:46</time> <a href="../../users/3809991/tul1" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3809991.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="tul1" /> </a> <div class="s-user-card--info"> <a href="../../users/3809991/tul1" class="s-user-card--link">tul1</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">412</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="6 silver badge">6</li> <li class="s-award-bling s-award-bling__bronze" title="22 bronze badge">22</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-42313625"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>4</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/42313625/symfony-3-websocketbundle-pdosessionhandler" class="question-hyperlink">Symfony 3 WebSocketBundle PdoSessionHandler</a></h3> <div class="excerpt">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: …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/websocket" class="post-tag grid--cell" title="show questions tagged 'websocket'" rel="tag">websocket</a> <a href="../../questions/tagged/symfony" class="post-tag grid--cell" title="show questions tagged 'symfony'" rel="tag">symfony</a> <a href="../../questions/tagged/phpwebsocket" class="post-tag grid--cell" title="show questions tagged 'phpwebsocket'" rel="tag">phpwebsocket</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 18 '17 at 09:52">asked Feb 18 '17 at 09:52</time> <a href="../../users/7584581/nipec" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/7584581.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Nipec" /> </a> <div class="s-user-card--info"> <a href="../../users/7584581/nipec" class="s-user-card--link">Nipec</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">41</li> <li class="s-award-bling s-award-bling__bronze" title="1 bronze badges">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-39070318"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>4</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/39070318/how-to-understand-for-which-route-a-websocket-message-was-sent-by-the-client-i" class="question-hyperlink">How to understand, for which route a websocket message was sent by the client in a server?</a></h3> <div class="excerpt">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…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/websocket" class="post-tag grid--cell" title="show questions tagged 'websocket'" rel="tag">websocket</a> <a href="../../questions/tagged/phpwebsocket" class="post-tag grid--cell" title="show questions tagged 'phpwebsocket'" rel="tag">phpwebsocket</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 22 '16 at 01:34">asked Aug 22 '16 at 01:34</time> <a href="../../users/4332216/ikari" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4332216.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ikari" /> </a> <div class="s-user-card--info"> <a href="../../users/4332216/ikari" class="s-user-card--link">Ikari</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3,176</li> <li class="s-award-bling s-award-bling__gold" title="3 gold badges">3</li> <li class="s-award-bling s-award-bling__silver" title="29 silver badges">29</li> <li class="s-award-bling s-award-bling__bronze" title="34 bronze badges">34</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/phpwebsocket_page=1" rel="prev" title="Go to page 1">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/phpwebsocket_page=1" rel="" title="Go to page 1">1</a> <div class="s-pagination--item is-selected">2</div> <a class="s-pagination--item" href="../../questions/tagged/phpwebsocket_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/phpwebsocket_page=19" rel="" title="Go to page 19">19</a> <a class="s-pagination--item" href="../../questions/tagged/phpwebsocket_page=20" rel="" title="Go to page 20">20</a> <a class="s-pagination--item" href="../../questions/tagged/phpwebsocket_page=3" rel="next" title="Go to page 3"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>