'How to make two websocket connection on a single page using Timeme.js
I am using Timeme.js library's web socket functionality to connect my page with the socket. My requirement is to connect two sockets from different urls, in same page. Here is what I tried:-
TimeMe.initialize({
idleTimeoutInSeconds: 1000,
websocketOptions: {
websocketHost: "/firstSocketUrl"
}
});
TimeMe.websocket.on("firstSocketResponse",(data)=>{
console.log("first socket response ->",data);
});
TimeMe.initialize({
idleTimeoutInSeconds: 1000,
websocketOptions: {
websocketHost: "/secondSocketUrl"
}
});
TimeMe.websocket.on("secondSocketResponse",(data)=>{
console.log("first socket response ->",data);
})
But I am not receiving the backend response, is it possible to do something like this using Timeme.js kindle let me know? Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
