How i can read websocket api json format in Java Desktop App? i added your jar file and tryed this, but this not worked. and this is not import.
My webscoket api url : ws://168.119.56.105/radioapi/ws
WebSocketConnection connection = new WebSocketConnection();
connection.connect("ws://168.119.56.105/radioapi/ws", new WebSocketConnectionHandler() {
@Override
public void onConnect(ConnectionResponse response) {
System.out.println("Connected to server");
}
@Override
public void onOpen() {
connection.sendMessage("Echo with Autobahn");
}
@Override
public void onClose(int code, String reason) {
System.out.println("Connection closed");
}
@Override
public void onMessage(String payload) {
System.out.println("Received message: " + payload);
connection.sendMessage(payload);
}
});
How i can read websocket api json format in Java Desktop App? i added your jar file and tryed this, but this not worked. and this is not import. My webscoket api url : ws://168.119.56.105/radioapi/ws