pateltejasmca / phpwebsocket

Automatically exported from code.google.com/p/phpwebsocket
0 stars 0 forks source link

Websocket Keys Use Outdated Protocol Draft #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the demo chat using a new version of Chrome/Chromium

What is the expected output? What do you see instead?
Client connects. User can chat happily.

Instead, handshake fails, client disconnects.

Please provide any additional information below.
The draft spec used to use 2 keys to authenticate the handshake, and the new 
spec uses only 1 key. This causes the handshake to always fail. See:
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-09

Original issue reported on code.google.com by markfurneaux@gmail.com on 15 Aug 2011 at 4:49

GoogleCodeExporter commented 9 years ago
Sorry for the double post, but the current revision is actually 10 (see: 
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10).

Not only has the handshake changed, but the packet framing is entirely new.
I have modified the code to work with the new handshake, and I am currently 
working on the framing.

Original comment by markfurneaux@gmail.com on 15 Aug 2011 at 8:19

GoogleCodeExporter commented 9 years ago
I also have modified the code to accept both hixie and hybi handshakes. Framing 
is also implemented, although partially. Dont really know what to do with it, 
its completely different now (hacked in some things I needed as well like 
handling different URIs and admin connections). I am sure others are able to do 
it better, but I could upload it somewhere for reference?

Original comment by ch...@tanaskoski.com on 17 Aug 2011 at 4:57

GoogleCodeExporter commented 9 years ago
Would love to see the reference, I am working on the same issue, mine is all 
hacked together and only half works at the moment.

Original comment by Blo...@gmail.com on 17 Aug 2011 at 9:08

GoogleCodeExporter commented 9 years ago
Ok here it is. It works fine on a hobby site. Unfortunately I dont have a fully 
working demo.

Here are the steps to make it work:

* Extend the WebSocketServer class
* Add some ResourceHandlers to route different URIs to different classes.

The resourcehandlers receive the messages if URI matches, the 
WebSocketServer::onMessage reacts to all messages. 

Also the Flash Policy file hack posted on this projectpage is embedded.

The code is not always consistant, so be warned.

Original comment by ch...@tanaskoski.com on 18 Aug 2011 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
I'm hitting the same issues.  Has anyone successfully gotten this to run using 
HyBi 10?

Original comment by matt...@gmail.com on 30 Aug 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Making phpwebsocket work with HyBi 10 takes lots of modifications. Seems 
markfurneaux, Blo...@gmail.com and myself work on making it compatible. I have 
it running as I mentioned in comment #4, but it works a bit different than it 
used to.

Original comment by ch...@tanaskoski.com on 30 Aug 2011 at 7:44

GoogleCodeExporter commented 9 years ago
Hi All, Is this fixed by any chance??

many thanks

Original comment by kiran00...@gmail.com on 30 Sep 2011 at 7:34

GoogleCodeExporter commented 9 years ago
Hi, I am trying to use PHPWebSocket for a game I am working on and im having 
loads of trouble trying to find a working version. Does anybody have a version 
of PHP Web Socket in its simplest form. I have had a go at trying to make it 
work and I do have some communication but I don't think I'm doing the handshake 
properly. Could someone help? 

Original comment by Liam...@gmail.com on 16 Nov 2011 at 4:48

Attachments:

GoogleCodeExporter commented 9 years ago
Hi all!

I've the same issue! I still can't connect to the server.php
I'm using XAMPP-package as Webserver and in placed the server.php file in
"localhost/SocketServer/phpWebSockets/googlewebsockets/server.php".

So is it right, that I'll have to initialize the variable "host" like that:
"var host = 
"ws://localhost:12345/SocketServer/phpWebSockets/googlewebsockets/server.php";" 
??

thanks

Original comment by pedrok1...@gmail.com on 13 Dec 2011 at 10:02

GoogleCodeExporter commented 9 years ago
Hi, i've updated the handshake and now it works with the last protocol under 
firefox and chrome, but i cannot receive any messages after the handshake. 
The js client send() command is executed but no packages are received on server 
side after the handshake. I guess is related with the framing.
Any updates on that?

Original comment by hrodi...@gmail.com on 15 Dec 2011 at 3:14