I’m making a chat app with socket.io, and I’d like to use my custom client id, instead of the default ones (8411473621394412707, 1120516437992682114). Is there any ways of sending the custom identifier when connecting or just using something to track a custom name for each ID? Thanks!
I’m making a chat app with socket.io, and I’d like to use my custom
Share
You can create an array on the server, and store custom objects on it. For example, you could store the id created by Socket.io and a custom ID sent by each client to the server:
in this example, you need to call storeClientInfo from each client.
Hope this helps.