websockets

This is a sample Java application for websockets demo. It uses an embeded server to host the websocket service and then uses a Java client to connect to the service. Once the connection is established, client can keep on sending sample messages and then service end point returns the response back to the client.

To run the application:

First Run the server by running and then if it's successful run client program.

  • WebSocketServer.java
  • ClientWSEndpoint.java.

Once client is run, you can type any text and it will be sent to the server. Logs confirm the same.

Play with application, it's quite trivial.

But you need to be clear with the life cycle methods.

--HAPPY LEARNING !