Example of a websocket client written in Java It implements the Websocket.Listener interface for communicating over WebSocket protocol. It uses GSON deserializer for handling JSON messages.
CTL+ALT+SHIFT+S(Windows) to open the project structure dialog.- Select
Librariesfrom the left pane. - Click the
+button to add a new library. - Select
From Mavenfrom the dropdown. - Search for
com.google.code.gsonand select the latest version. - Click
Applyto add the library to the project.