Closed xoji closed 2 months ago
Could you edit your post so that your code is wrapped in a code block:
```javascript
my code here
```
Also, I do not use classes so I cannot help you navigate any problems with OOP code decoration. Here is how I have solved for this in TypeScript with just functions and an object for storing sockets:
My websocket implementation is at:
My TypeScript definition for the websocket code is at:
I define a websocket as (my personal implementation):
cc @nodejs/platform-macos
I noticed that the problem is due to cluster. when I save a client using cluster, the reference to the client object is lost. Even native (created websocket server) shows number of clients 0
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
I have web sockets in my project. when connecting a client, I generate an id for uniqueness and save it in a static class variable, but when I use the
getClient
method, it returns an empty array. This is exactly what happens on the Mac. I tested it on two different macs. But in Windows it works fine. my code:I tried to create a variable outside the class and record the clients there but the result is the same. Launched and tested in windows everything works fine but the same code and the same libraries but does not work on macOS. I tried on a poppy with an intel processor and with an apple processor. The result is the same.