This should be possible, so these args are passed further to ws Server constructor:
const stompServer = new StompServer({
noServer: true
});
Workaround
There is a workaround available to pass an http server which will not be used later:
const stompServer = new StompServer({
path: '/any-path',
// this is a fake server passed because stomp-broker-js does not want to pass
// { server: undefined, noServer: true } to ws library, which is supported and totally should work.
server: http.createServer()
});
Then websocket server is available anyway at stompServer.socket, and the instruction for multiple socket connection is still able to be followed.
Description
StompServer has mandatory argument of HttpServer. However if multiple websocket connections are needed at one http server, the websocket server needs to be setup with
noServer: true
as described here: https://github.com/websockets/ws#multiple-servers-sharing-a-single-https-serverExpectation
This should be possible, so these args are passed further to
ws
Server constructor:Workaround
There is a workaround available to pass an http server which will not be used later:
Then websocket server is available anyway at
stompServer.socket
, and the instruction for multiple socket connection is still able to be followed.