problem description
Why does websocket keep PING PONG after connecting to the server
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)
var url = "ws://192.168.100.209:61614/stomp";
var topic = "emp.alarm.empAlarmRecord";
var passcode = "admin";
var login = "admin";
var client = Stomp.client(url);
var onconnect = function(frame) {
client.subscribe(topic, function(message) {
console.log(message);
});
};
client.connect(login, passcode, onconnect);
what result do you expect? What is the error message actually seen?
< CONNECTED
server:ActiveMQ/5.15.4
heart-beat:10000,10000
session:ID:HTGWSoft-54998-1535002324404-5:17
version:1.1
PING
PONG
PING
PONG