Is it possible to terminate a websocket connection from server without closing the entire server? If it is then, how can I achieve it?
Note: I\'m using NodeJS as bac
According to the ws documentation, you need to call websocket.close() to terminate a connection.
websocket.close()
let server = new WebSocketServer(options); server.on('connection', ws => { ws.close(); //terminate this connection });