Is there a way to destroy everything attached to a socket?

Also, I’m guessing there is now way to destroy everything attached to a socket?