Try:
http://github.com/TooTallNate/Java-WebSocket
Contains the implementation of the client and server. The example folder has a simple JFrame subclass called ChatClient . Look at the source for Swing help.
Essentially, you just need to subclass net.tootallnate.websocket.WebSocketClient and implement the onOpen , onClose and onMessage . The class has an interface very similar to the WebSockets API for HTML5.
TooTallNate Aug 01 '10 at 19:45 2010-08-01 19:45
source share