btford / btford/angular-socket-io
How to reset sockets?
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Hello;
I have following service in my code:
```
getSocket: function(shopId) {
var ioWebSocket = io.connect($location.protocol() + '://' + $location.host() + ':' + $location.port() + '/web', {
query: "shop=" + shopId
});
var mySocket = socketFactory({
ioSocket: ioWebSocket
});
mySocket.forward('feedback');
mySocket.forward('order');
mySocket.forward('deviceCount');
return mySocket;
}
```
Here shops can be changed. But whenever I call getSocket service, it returns me same socket. It should be disconnect from one socket and connect to another one but it does not. How can I solve that?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.