I search for some C++ ipc lib that all开发者_高级运维ow me to simple switch between named pipes (local use) and tcp ip sockets so i can send messages outside computer.
My app have to parts. First is users space app second is service. I need to send short messages between them.
Platform Windows
I would recommend
Using RPC for IPC
RPC enables applications to call functions remotely. Therefore, RPC makes IPC as easy as calling a function. RPC operates between processes on a single computer or on different computers on a network.
http://msdn.microsoft.com/en-us/library/aa365574(v=vs.85).aspx
and Best RPC Programming Practices :
http://msdn.microsoft.com/en-us/library/aa373563(v=vs.85).aspx
What platform are you targeting? While not with named pipes, but memory-mapped files, our MsgConnect seems to fit your needs. It was designed specifically for tasks like yours. MsgConnect lets you send messages with data payload on the local system (using memory-mapped files or TCP or UDP sockets) or across network (using TCP or UDP sockets).
With RCF C++ you can switch your transport layer (be it named pipes, tcp and udp with Boost:ASIO, etc) quite seamlessly.
精彩评论