Modify program so that server can repeatedly receive data from client

The loop continues forever until negative number is sent from the client.