Ricart Agrawala C code?

Hi, I need a socket programming c code of the Ricart Agrawala algorithm.
I am not able to make a peer to peer UDP multicast communication.