in reply to Re^2: Detect socket
in thread Detect socket

That's like wondering if a certain address contains a file-descriptor. You might be able to make the determination, but why would you want to?