I have already active connection list.
I have also all active connection resource Id, I want to when click Unlock then close connection.
I have try to close connection using JavaScript but it's generate new connection.
var socket = new WebSocket("ws://localhost:6001/ocpp/CP0002");
socket.onopen = function(event) {
console.log("Connection established");
}
window.onbeforeunload = function() {
socket.onclose = function () {
console.log('Disconnected')
}; // disable onclose handler first
socket.close();
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.