Pseudocode for Bitcoin’s P2P block propagation

I am going through Bitcoin’s block propagation method at

Are you aware of any pseudocode available on how blocks are propagated during the initial syncing and when new blocks are generated? It would be nice to understand all the checks that happen in P2P layer.