Skip to content

Commit b491f79

Browse files
committed
beautify params.json
1 parent 603d7a8 commit b491f79

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

params.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
{"tagline":"A barebones WebSocket client and server implementation written in 100% Java.","body":"Java WebSockets\r\n===============\r\n\r\nThis repository contains a barebones WebSocket server and client implementation\r\nwritten in 100% Java. The underlying classes are implemented using the Java\r\n`ServerSocketChannel` and `SocketChannel` classes, which allows for a\r\nnon-blocking event-driven model (similar to the\r\n[WebSocket API](http://dev.w3.org/html5/websockets/) for web browsers).\r\n\r\nImplemented WebSocket protocol versions are:\r\n\r\n * [Hixie 75](http://tools.ietf.org/id/draft-hixie-thewebsocketprotocol-75.txt)\r\n * [Hixie 76](http://tools.ietf.org/id/draft-hixie-thewebsocketprotocol-76.txt)\r\n * [Hybi 10](http://tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-10.txt)\r\n * [Hybi 17](http://tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-17.txt)\r\n * [RFC 6455](http://tools.ietf.org/html/rfc6455)\r\n\r\n\r\nRunning the Example\r\n-------------------\r\n\r\nThere's a simple chat server and client example located in the `example`\r\nfolder. First, compile the example classes and JAR file:\r\n\r\n``` bash\r\nant\r\n```\r\n\r\nThen, start the chat server (a `WebSocketServer` subclass):\r\n\r\n``` bash\r\njava -cp build/examples:dist/WebSocket.jar ChatServer\r\n```\r\n\r\nNow that the server is started, we need to connect some clients. Run the\r\nJava chat client (a `WebSocketClient` subclass):\r\n\r\n``` bash\r\njava -cp build/examples:dist/WebSocket.jar ChatClient\r\n```\r\n\r\n__Note:__ If you're on Windows, then replace the `:` (colon) in the classpath\r\nin the commands above with a `;` (semicolon).\r\n\r\nThe chat client is a simple Swing GUI application that allows you to send\r\nmessages to all other connected clients, and receive messages from others in a\r\ntext box.\r\n\r\nThere's also a simple HTML file chat client `chat.html`, which can be opened\r\nby any browser. If the browser natively supports the WebSocket API, then it's\r\nimplementation will be used, otherwise it will fall back to a\r\n[Flash-based WebSocket Implementation](http://github.com/gimite/web-socket-js).\r\n\r\n\r\nWriting your own WebSocket Server\r\n---------------------------------\r\n\r\nThe `org.java_websocket.server.WebSocketServer` abstract class implements the\r\nserver-side of the\r\n[WebSocket Protocol](http://www.whatwg.org/specs/web-socket-protocol/).\r\nA WebSocket server by itself doesn't do anything except establish socket\r\nconnections though HTTP. After that it's up to **your** subclass to add purpose.\r\n\r\n\r\nWriting your own WebSocket Client\r\n---------------------------------\r\n\r\nThe `org.java_websocket.server.WebSocketClient` abstract class can connect to\r\nvalid WebSocket servers. The constructor expects a valid `ws://` URI to\r\nconnect to. Important events `onOpen`, `onClose`, `onMessage` and `onIOError` \r\nget fired throughout the life of the WebSocketClient, and must be implemented \r\nin **your** subclass.\r\n\r\nWSS Support\r\n---------------------------------\r\n\r\nWSS support is still VERY young ( https://github.com/TooTallNate/Java-WebSocket/pull/101 ).\r\nThe only way to use wss is currently the one shown in the example. That also means that you have to switch between ws and wss. \r\nYou can not have both at the same time on the same port.\r\n\r\nIf you do not have a valid certificate in place then you will have to create a self signed one.\r\nBrowsers will simply refuse the connection in case of a bad certificate and will not ask the user to accept it.\r\nSo the first step will be to make a browser to accept your self signed certificate. ( https://bugzilla.mozilla.org/show_bug.cgi?id=594502 )\r\nIf the websocket server url is `wss://localhost:8000` visit the url `htts://localhost:8000` with your browser. The browser will recognize the handshake and allow you to accept the certificate.\r\n\r\nI ( @Davidiusdadi ) would be glad if you would give some feedback whether wss is working fine for you or not.\r\n\r\nMinimum Required JDK\r\n--------------------\r\n\r\n`Java-WebSocket` is known to work with:\r\n\r\n * Java 1.5 (aka SE 6)\r\n * Android 1.6 (API 4)\r\n\r\nOther JRE implementations may work as well, but haven't been tested.\r\n\r\n\r\nTesting in Android Emulator\r\n---------------------------\r\n\r\nPlease note Android Emulator has issues using `IPv6 addresses`. Executing any\r\nsocket related code (like this library) inside it will address an error\r\n\r\n``` bash\r\njava.net.SocketException: Bad address family\r\n```\r\n\r\nYou have to manually disable `IPv6` by calling\r\n\r\n``` java\r\njava.lang.System.setProperty(\"java.net.preferIPv6Addresses\", \"false\");\r\njava.lang.System.setProperty(\"java.net.preferIPv4Stack\", \"true\");\r\n```\r\n\r\nsomewhere in your project, before instantiating the `WebSocketClient` class. \r\nYou can check if you are currently testing in the Android Emulator like this\r\n\r\n``` java\r\nif (\"google_sdk\".equals( Build.PRODUCT )) {\r\n // ... disable IPv6\r\n}\r\n```\r\n\r\n\r\nGetting Support\r\n---------------\r\n\r\nIf you are looking for help using `Java-WebSocket` you might want to check out the\r\n[#java-websocket](http://webchat.freenode.net/?channels=java-websocket) IRC room\r\non the FreeNode IRC network.\r\n\r\n\r\nLicense\r\n-------\r\n\r\nEverything found in this repo is licensed under an MIT license. See\r\nthe `LICENSE` file for specifics.\r\n","google":"UA-29486455-1","note":"Don't delete this file! It's used internally to help with page regeneration.","name":"Java-WebSocket"}
1+
{
2+
"tagline": "A barebones WebSocket client and server implementation written in 100% Java.",
3+
"body": "Java WebSockets\r\n===============\r\n\r\nThis repository contains a barebones WebSocket server and client implementation\r\nwritten in 100% Java. The underlying classes are implemented using the Java\r\n`ServerSocketChannel` and `SocketChannel` classes, which allows for a\r\nnon-blocking event-driven model (similar to the\r\n[WebSocket API](http://dev.w3.org/html5/websockets/) for web browsers).\r\n\r\nImplemented WebSocket protocol versions are:\r\n\r\n * [Hixie 75](http://tools.ietf.org/id/draft-hixie-thewebsocketprotocol-75.txt)\r\n * [Hixie 76](http://tools.ietf.org/id/draft-hixie-thewebsocketprotocol-76.txt)\r\n * [Hybi 10](http://tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-10.txt)\r\n * [Hybi 17](http://tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-17.txt)\r\n * [RFC 6455](http://tools.ietf.org/html/rfc6455)\r\n\r\n\r\nRunning the Example\r\n-------------------\r\n\r\nThere's a simple chat server and client example located in the `example`\r\nfolder. First, compile the example classes and JAR file:\r\n\r\n``` bash\r\nant\r\n```\r\n\r\nThen, start the chat server (a `WebSocketServer` subclass):\r\n\r\n``` bash\r\njava -cp build/examples:dist/WebSocket.jar ChatServer\r\n```\r\n\r\nNow that the server is started, we need to connect some clients. Run the\r\nJava chat client (a `WebSocketClient` subclass):\r\n\r\n``` bash\r\njava -cp build/examples:dist/WebSocket.jar ChatClient\r\n```\r\n\r\n__Note:__ If you're on Windows, then replace the `:` (colon) in the classpath\r\nin the commands above with a `;` (semicolon).\r\n\r\nThe chat client is a simple Swing GUI application that allows you to send\r\nmessages to all other connected clients, and receive messages from others in a\r\ntext box.\r\n\r\nThere's also a simple HTML file chat client `chat.html`, which can be opened\r\nby any browser. If the browser natively supports the WebSocket API, then it's\r\nimplementation will be used, otherwise it will fall back to a\r\n[Flash-based WebSocket Implementation](http://github.com/gimite/web-socket-js).\r\n\r\n\r\nWriting your own WebSocket Server\r\n---------------------------------\r\n\r\nThe `org.java_websocket.server.WebSocketServer` abstract class implements the\r\nserver-side of the\r\n[WebSocket Protocol](http://www.whatwg.org/specs/web-socket-protocol/).\r\nA WebSocket server by itself doesn't do anything except establish socket\r\nconnections though HTTP. After that it's up to **your** subclass to add purpose.\r\n\r\n\r\nWriting your own WebSocket Client\r\n---------------------------------\r\n\r\nThe `org.java_websocket.server.WebSocketClient` abstract class can connect to\r\nvalid WebSocket servers. The constructor expects a valid `ws://` URI to\r\nconnect to. Important events `onOpen`, `onClose`, `onMessage` and `onIOError` \r\nget fired throughout the life of the WebSocketClient, and must be implemented \r\nin **your** subclass.\r\n\r\nWSS Support\r\n---------------------------------\r\n\r\nWSS support is still VERY young ( https://github.com/TooTallNate/Java-WebSocket/pull/101 ).\r\nThe only way to use wss is currently the one shown in the example. That also means that you have to switch between ws and wss. \r\nYou can not have both at the same time on the same port.\r\n\r\nIf you do not have a valid certificate in place then you will have to create a self signed one.\r\nBrowsers will simply refuse the connection in case of a bad certificate and will not ask the user to accept it.\r\nSo the first step will be to make a browser to accept your self signed certificate. ( https://bugzilla.mozilla.org/show_bug.cgi?id=594502 )\r\nIf the websocket server url is `wss://localhost:8000` visit the url `htts://localhost:8000` with your browser. The browser will recognize the handshake and allow you to accept the certificate.\r\n\r\nI ( @Davidiusdadi ) would be glad if you would give some feedback whether wss is working fine for you or not.\r\n\r\nMinimum Required JDK\r\n--------------------\r\n\r\n`Java-WebSocket` is known to work with:\r\n\r\n * Java 1.5 (aka SE 6)\r\n * Android 1.6 (API 4)\r\n\r\nOther JRE implementations may work as well, but haven't been tested.\r\n\r\n\r\nTesting in Android Emulator\r\n---------------------------\r\n\r\nPlease note Android Emulator has issues using `IPv6 addresses`. Executing any\r\nsocket related code (like this library) inside it will address an error\r\n\r\n``` bash\r\njava.net.SocketException: Bad address family\r\n```\r\n\r\nYou have to manually disable `IPv6` by calling\r\n\r\n``` java\r\njava.lang.System.setProperty(\"java.net.preferIPv6Addresses\", \"false\");\r\njava.lang.System.setProperty(\"java.net.preferIPv4Stack\", \"true\");\r\n```\r\n\r\nsomewhere in your project, before instantiating the `WebSocketClient` class. \r\nYou can check if you are currently testing in the Android Emulator like this\r\n\r\n``` java\r\nif (\"google_sdk\".equals( Build.PRODUCT )) {\r\n // ... disable IPv6\r\n}\r\n```\r\n\r\n\r\nGetting Support\r\n---------------\r\n\r\nIf you are looking for help using `Java-WebSocket` you might want to check out the\r\n[#java-websocket](http://webchat.freenode.net/?channels=java-websocket) IRC room\r\non the FreeNode IRC network.\r\n\r\n\r\nLicense\r\n-------\r\n\r\nEverything found in this repo is licensed under an MIT license. See\r\nthe `LICENSE` file for specifics.\r\n",
4+
"google": "UA-29486455-1",
5+
"note": "Don't delete this file! It's used internally to help with page regeneration.",
6+
"name": "Java-WebSocket"
7+
}

0 commit comments

Comments
 (0)