Answer the question
In order to leave comments, you need to log in
How to open several different WebSocket connections to the same server/port from NodeJS?
To test the WS application, it was necessary to open several connections in parallel:
1 as an admin, several as users. So far, I have done the entire test in one script: admin and user objects are created,
each creates its own WS instance :
const WebSocket = require('ws');
this.ws = new WebSocket(`ws://${this.server_ip}:${this.server_ws_port}`);
127.0.0.1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question