Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
How to close websocket connection via already established websocket connection using websocket Resource Id?

I have already active connection list.

enter image description here

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();
};
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!