making recvData return an int so we can get the value to know if the client has disconnected or not