File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments