Local Host:
All the network testing I've done on localhost has been completely misleading. Since it's a perfect environment it's useless...
Packet Loss:
The packet loss and latency you experience will differ based on your current lan set up. I've set up on several separate routers, and gotten completely different results.
Recommendation:
It would be horrifically slow to compile, throw the executable elsewhere, recompile (in the beginning, before menus and such) run it on your compie, and connect, then test.
What I've done lately is have a persistant server (on another computer) that simply forwards whatever is sent over any port to a partner, and use set my program up as a client, so there's no further config necessary. It's a path that's treated me well so far.