UDP packets can even be lost on the local host. In addition, since UDP is based on a datagram and does not have guaranteed delivery, it is difficult to transfer large blocks of data. Finally, UDP on localhost is sometimes blocked by browsers. In general, UDP is usually not even considered for single-computer IPCs.
On Windows, I recommend memory mapped files + synchronization primitives as the fastest and possibly easiest way. Named pipes usually work well when you manage them to work, but I see a lot of questions here about how to make named pipes work at all (and I haven't seen a single complaint about MMF yet).
We have a MsgConnect product that provides the transfer of sockets, UDP and MMF, suitable for IPC locally or over the network, so I have practical experience in this topic. Named pipes were considered for support, but then the idea was discarded in favor of other mechanisms.
source share