Welcome!
Do you want to know how to implement a multi-threaded WebSockets JAVA server that conforms to RFC 6455? Well, you have come to the right place.
This blog will share how this was written (it’s only a few ‘kb’) and discusses the details on how to perform the client->server ‘handshake’, how to generate the server ‘accept’ key, how to ‘decode’ the masked payload and how to write a ‘frame’ back to the client. All of the things you need as you build out your own WebSockets Java server.
You will see several pages on this blog;
- JavaScript Test Client,
- WebSockets Java Client,
- WebSockets Java Server,
- Download,
- Installation
Each of these pages has specifics in context. For example, the JavaScript page deals with how to test the server — which is simplistic. The WebSockets Java Server page deals with all of the activities that are necessary to accept and initiate the ‘session’, the handshaking, and of course sending and receiving data to and from the client.
The Download page is self explanatory and all source is included — of course.
Note: I won’t go into the details on what WebSockets is, what it can be used for etc. There are plenty of resources around the web for that
Please leave comments as appropriate, and I will do my best to respond in a timely fashion.
Cheers,
J. Stewart