While debugging a TCPSocket connect problem in a desktop app, I noticed that the socket port reported in the debugger is not what I had set it to. I then used the debugger on a program that connects properly to the same service and it reported the same thing. Is this a bug or just the way it works?
Standard procedure. When you make a connection, the server hands you off to another port so it can continue to listen for connections on the original port. Otherwise, it would be limited to a single connection at a time.