You can used my lib to connect to caspar.
But it’s a litle complex for beginer.
You can also use the Stillsoft lib more easy to use to begin. You can inspire you by regarding his code on ClientExample 
I began like you 7 years laters and now I’m a professional developer. Keep coding and have fun.