How can I find the location of a socket through c++?

There is also this option.

Link to other similar question