Receiving data through a VPN tunnel



I need to code a client that receives data (binary) from a server over
a VPN tunnel. I did a search for some example code i could test/learn
from but didnt find anything. Could someone please point me to some
docs or some code that would ilustrate how this can be accomplished?

Best Regards,