@@ -2,9 +2,9 @@ Java WebSockets
22===============
33
44This repository contains a simple WebSocket server and client implementation
5- in Java. The underlying classes use ` ServerSocketChannel ` and ` SocketChannel `
6- objects , to allow for a non-blocking event-driven model (similar to the
7- WebSocket API for web browsers).
5+ in Java. The underlying classes use the Java classes ` ServerSocketChannel ` and
6+ ` SocketChannel ` , to allow for a non-blocking event-driven model (similar to the
7+ [ WebSocket API] ( < http://dev.w3.org/html5/websockets/ > ) for web browsers).
88
99Running the Example
1010-------------------
@@ -24,22 +24,23 @@ The chat client is a simple Swing GUI that allows you to send messages to
2424all other connected clients, and recieve messages from others in a text box.
2525
2626There's also a simple HTML file chat client ` chat.html ` , which can be opened
27- by any browser that supports the WebSocket API (currently Chrome 4, Safari
28- nightlies, Firefox nightlies).
27+ by any browser. If the browser natively supports the WebSocket API, then it will
28+ be used, otherwise it will fall back to a
29+ [ Flash-based WebSocket Implementation] ( < http://github.com/gimite/web-socket-js > ) .
2930
3031Writing your own WebSocket Server
3132---------------------------------
3233
33- A WebSocketServer by itself doesn't do anything except establish socket
34+ A WebSocket server by itself doesn't do anything except establish socket
3435connections though HTTP. After that it's up to a subclass to add purpose.
35-
36+ The ` WebSocketServer ` class implements the server-side of the
37+ [ WebSocket Protocol] ( < http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol > ) .
3638
3739Writing your own WebSocket Client
3840---------------------------------
3941
40- The WebSocketClient aims to simulate the WebSocket API
41- (< http://dev.w3.org/html5/websockets/ > ) as closely as possible.
42- The constructor expects a valid "ws://" URI to connect to. Important
42+ The ` WebSocketClient ` class can connect to valid WebSocket servers.
43+ The constructor expects a valid ` ws:// ` URI to connect to. Important
4344events ` onOpen ` , ` onClose ` , and ` onMessage ` get fired throughout the life
4445of the WebSocketClient, and must be implemented in your subclass.
4546
0 commit comments