i am getting some thing in while loop and want to pass that on to my rest of the programme. But i want that loop to be always running.
but my code get strucks in the loop and does not move forward...
i am not getting how to keep that loop ruuning and moving on the next line :s

You might need to spawn a thread, depending on how complicated of a program you are creating.

What do you mean it gets stuck?

Do you have a small sample to show?

Post the relevant section of code, so we can help you figure it out.

write your while loop in a function and keep calling the function. but you have to break the while loop if you don't receive the data.

void getFunc()
{
    while(true)	{
	    //receive function                
	    if(receive function returns true) {
                //like you said copy these value to your variables
	    }else	{
		break;
            }
    }
}

Remember you should keep calling the getFunc() from your main program.

Regards.

Without seeing your code, it's hard to tell exactly what you want. But from your description, I would have a look here.