I am working on a simple chat application using node.js and socket.io .
I am trying to end the connection, for example, when the user decided to leave the namespace or something similar to logging out, which does not exit the application or does not start the reboot.
I checked this @ GitHub issue, as well as these issues,
They offer different methods such as disconnect , close , etc.
In accordance with my own experiments based on them,
Both disconnect , close methods set the socket connected property to false and the disconnected property true, as you can see below.

I also noticed the destroy method in the socket prototype:

Can someone describe what exactly these methods are for and how they differ from each other ??
Side note: it would be great if someone could share a documentation link for these methods
source share