Merge pull request #131 from veebs/WebSocketVersion3.2

Changed tabs to spaces and added some docs for websocket packages.
This commit is contained in:
Vibul Imtarnasan 2011-12-15 03:51:09 -08:00
commit 9d8f08628e
48 changed files with 2866 additions and 2870 deletions

View File

@ -47,11 +47,13 @@
* }
* </code>
*
* <p>10. Run the test <tt>python fuzzing_client.py</tt>. Note that the actual test case python code is
* <p>11. Run <tt>WebSocketServer</tt> in this package.
*
* <p>11. Run the test <tt>python fuzzing_client.py</tt>. Note that the actual test case python code is
* located in <tt>/usr/local/lib/python2.6/dist-packages/autobahn-0.4.3-py2.6.egg/autobahn/cases</tt>
* and not in the checked out git repository.
*
* <p>11. See the results in <tt>reports/servers/index.html</tt>
* <p>12. See the results in <tt>reports/servers/index.html</tt>
*/
package org.jboss.netty.example.http.websocketx.autobahn;

View File

@ -36,13 +36,10 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
*
* <ul>
* <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
* <li>
* <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)
* <li>
* <li>Chrome 14+ (draft-ietf-hybi-thewebsocketprotocol-10)
* <li>
* <li>Chrome 16+ (RFC 6455 aka draft-ietf-hybi-thewebsocketprotocol-17)
* <li>Firefox 7+ (draft-ietf-hybi-thewebsocketprotocol-10)
* <li>
* </ul>
*/
public class WebSocketServer {

View File

@ -36,13 +36,10 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
*
* <ul>
* <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
* <li>
* <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)
* <li>
* <li>Chrome 14+ (draft-ietf-hybi-thewebsocketprotocol-10)
* <li>
* <li>Chrome 16+ (RFC 6455 aka draft-ietf-hybi-thewebsocketprotocol-17)
* <li>Firefox 7+ (draft-ietf-hybi-thewebsocketprotocol-10)
* <li>
* </ul>
*/
public class WebSocketSslServer {

View File

@ -47,7 +47,7 @@ public class WebSocketServerHandshaker13 extends WebSocketServerHandshaker {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(WebSocketServerHandshaker13.class);
public static final String WEBSOCKET_17_ACCEPT_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
public static final String WEBSOCKET_13_ACCEPT_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
private boolean allowExtensions = false;
@ -122,7 +122,7 @@ public class WebSocketServerHandshaker13 extends WebSocketServerHandshaker {
res.setStatus(HttpResponseStatus.BAD_REQUEST);
return;
}
String acceptSeed = key + WEBSOCKET_17_ACCEPT_GUID;
String acceptSeed = key + WEBSOCKET_13_ACCEPT_GUID;
byte[] sha1 = sha1(acceptSeed.getBytes(CharsetUtil.US_ASCII));
String accept = base64Encode(sha1);

View File

@ -24,7 +24,7 @@ import org.jboss.netty.handler.codec.http.HttpVersion;
import org.jboss.netty.handler.codec.http.HttpHeaders.Names;
/**
* Instances the appropriate handshake class to use for clients
* Instances the appropriate handshake class to use for servers
*/
public class WebSocketServerHandshakerFactory {

View File

@ -50,6 +50,6 @@ public enum WebSocketVersion {
} else if (this == V13) {
return "13";
}
throw new IllegalArgumentException(this.toString() + " cannot be converted to a string.");
throw new IllegalArgumentException(this.toString() + " cannot be converted to a HttpHeaderValue.");
}
}