Register event emitters and listeners for inter-process communication.