For a quick and easy connection, you can consider Mailslots . They are pretty easy to use. You interact with them as with a file.
Mailslots are most suitable when you want to send commands to multiple recipients or receive messages from several producers, and your design may tolerate an occasional lost message. The named pipes mentioned above are better suited for a single IPC with guaranteed delivery from a process to a single process.
Good news
- They are very easy to use.
- They support asynchronous operation.
- They can be used even if Windows Process is isolated. This means that you can use them to communicate between different user sessions (for example, using Windows services).
- They can send messages to the entire domain by opening the mailbox for "\ * \ mailslot [path] name". When you write a mailbox with that name, it sends it to every mailbox with that name on every computer in your domain.
Bad news
- Only 424 bytes can be transmitted over the network. More data can be transmitted locally.
- They are UDP based, so use them if you lose your message from time to time.
- Sometimes (especially on multiprocessor systems) messages can be delivered a little out of order.
Many samples are available, but I don't have enough posts yet to publish more than one in CodeProject in C ++
source share