Skip to content

Commit 8cae421

Browse files
Update readme
1 parent 2d6a84b commit 8cae421

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Diff for: README

Whitespace-only changes.

Diff for: README.markdown

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
java-websocket-client
2+
=====================
3+
This project is intended to provide a Java WebSocket class similar to the standard W3C WebSocket class found
4+
in browsers. While it is just standard Java, I wrote it for an Android app and have geared it in that
5+
direction.
6+
7+
The client implements draft76 (currently this is what the browsers support) and draft03 (which is newer
8+
but as yet not implemented by mainstream browsers). I intend to track the draft03 work with how the spec
9+
evolves.
10+
11+
The companion to this project is node-websocket-handler (https://github.com/stellaeof/node-websocket-handler), which
12+
provides WebSocket handling in a node.js environment.
13+
14+
Approach
15+
--------
16+
Unlike a simple protocol abstraction class, this implementation is thread-aware and was built to operate in a GUI
17+
environment where all IO should happen off of the main event thread. Thread marshalling is all built-in just as
18+
in the W3C WebSocket API it was modeled after.
19+
20+
I ended up doing blocking IO instead of using NIO for a couple of reasons:
21+
22+
* On Android, everything uses the blocking model with worker threads anyway
23+
* Implementing NIO-based SSL is a royal PITA
24+
* For a client, there isn't going to be much saved (if anything) to offset the complexity
25+
26+
Status
27+
------
28+
This project is not yet done and I don't recommend using it just yet.
29+

0 commit comments

Comments
 (0)