I’ve not spent a lot of time with sockets until a recent project and it’s been a definitely learning experience. There is nothing like the School of Lessons Learned the Hard Way to truly learn something.
I ran across a tool today that is now definitely in my standard toolbox. If you ever receive a Port In Use error when dealing with sockets, on Windows at least, you can find out what ports are in use by what applications by using TCPView which is a free download from http://technet.microsoft.com/en-us/sysinternals/bb897437. This nifty utility lets you easily see which processes have what ports open, TCP or UDP, how much data has been transferred, etc. It even resolves the addresses of any clients that are connecting to that port. Very handy and extremely useful.
Is there such a tool available for Mac OS X?
When dealing with networking, what tools do you find invaluable?