Ok let me see if I can get this strait.

What you are after is that a message has been caught that says your program is now going to receive data. Now you want to take the data that is comming in and send it to a function to put it some where. Is this what you are after?