New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HyBi-07 spec support #12
Conversation
Wow! Looking good! Do you know if there's any (beta) builds of any web browser that can work with this? |
And one more thing, I consider the Server accepting an optional |
Early Firefox builds have it: http://www.ducksong.com/misc/websockets-builds/ws-07/5.0.a2.03/ Yeah, no problem, I am just a bit confused about what you want me to do. Do you want me to have an |
it should happen if auto was passed or if version 7 was explicitly passed: if (this.draft == WebSocketDraft.AUTO || this.draft == WebSocketDraft.VERSION_7) Sent from my iPhone On May 7, 2011, at 11:41, alecgorgereply@reply.github.com wrote:
|
|
||
String websocketVersion = p.getProperty("Sec-WebSocket-Version"); | ||
|
||
if (this.draft == WebSocketDraft.AUTO || this.draft == WebSocketDraft.VERSION_7) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebSocketDraft.VERSION_7
-> WebSocketDraft.VERSION_07
Hhmmmm.... so I can't seem to get this work with the ChatClient (using the new |
Hmm. I'll look at it this evening. I don't know why it isn't working now. |
Cool thanks, I'm excited to get this merged! On Tue, May 10, 2011 at 9:18 AM, alecgorge <
|
I just tried and it worked for me. Maybe start with a clean directory? |
I don't think you're updating the diff --git a/example/ChatClient.java b/example/ChatClient.java
index d72613e..f03294f 100644
--- a/example/ChatClient.java
+++ b/example/ChatClient.java
@@ -117,7 +117,7 @@ public class ChatClient extends WebSocketClient {
connect.setEnabled(false);
uriField.setEditable(false);
try {
- cc = new ChatClient(new URI(uriField.getText()), area, WebSocketDraft.DRAFT76);
+ cc = new ChatClient(new URI(uriField.getText()), area, WebSocketDraft.VERSION_07);
cc.connect();
} catch (URISyntaxException ex) {
area.append(uriField.getText() + " is not a valid WebSocket URI\n"); FWIW, before applying the above patch things are still working properly, since the ChatClient is attempting to connect to the server with |
Ah, I see what you mean now. That is odd. This one looks like it might be tricky to find. |
I can try to help diagnose, but do you know of an article anywhere or something that breaks down the differences from this new draft version from the previous one? Or if the differences are few, just list them off for me? I'm kind of clueless as to what this new version includes/fixes and whatnot. Thanks! |
I just read the spec ( I think there is a link in the op) and the Wikipedia article on websockets (it has an example). Sent from my iPhone On May 11, 2011, at 12:03 PM, TooTallNatereply@reply.github.com wrote:
|
So I just tried the Nightly firefox build that you linked to above. It doesn't seem to be connecting with the new draft, it still seems like draft 76 to me. Here's a dump of the Firefox build linked above, with a WebSocket connection attempt:
So it seems as though I can't test your code with that Firefox build. Does connecting to the server work properly from the iOS lib you linked to in the OP? |
Nightly tries to auto-update itself away from McManus's hybi-07 build and then you get stuck with draft 76 again. I like to go up a few directories on ducksong and install the latest version immediately before testing. |
Ended up merging #40 instead. |
This changes make this project conform to this draft of the specs: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07
There are no backward compatibility breaks in the server or client. The new server code is only active if the
Sec-WebSocket-Version
header is equal to7
.Another item was added to the enum as
VERSION_07
. This is only used on the client as draft detection is easier on the server than the difference between draft 75 and 76.I wish to add this feature because the only working iOS WebSocket client only support this draft revision.