For an IPC I used sockets for a long time. That's convenient and relatively fast.
Then I thought, at least when the 2 processes are on the same machine, that I could gain speed by using pipes instead. My idea of pipes was that they were using shared memory. But it turns out that my pipe communication is as slow as my socket communication. How can that be? Am I doing something wrong?
Currently, I have implemented the pipes on Windows, but if I can obtain a speed increase, I also want to do this on Linux.
Here my pipe implementation, client side:
// connect to an existing pipe:
// Write something:
// Read something:
And here my pipe implementation, server side:
// Create the pipe:
// Connect to client:
// Read and write from client is implemented in the same was as for the client read/write routines