What is the IPC method do i have to use between a c# for application to c++ dll injected in another process ?

I used socket but sometime its sends 1/2 of whole packet, and i know to repair it but its will slow down the process if i do that.

So im searching another IPC, can someone tell what is the best IPC method in this case ?

Thank you !