I would like to write a very simple program in bitcoin. I thought a simple C program that accepts the mined blocks would be appropriate. So I assume, the program would open a socket connection to some fixed relay node and start accepting the blocks. Could someone show how it could be done. Thank you.
[Edit:] I have since discovered what is probably best suited for the purpose. There is a minimal bitcoin networking stack implemented in python by Dr Christian Decker of ETH Zurich. It was used to gather results for some highly cited research papers on the bitcoin network but at the same time it is extremely readable too.