this code never receives anything in the second recv
even another while loop does not help
I only want the server to recive two pairs of co-ords then send two back
Well, those kind of errors occur sometimes and it's really important not to have them and detect them before they hurt you. For that you can also try using an app to help you. I tend to use checkamrx for code security and it works great.
So good luck.
Ben.