[英]communication between OS services with c++
I am developing 2 Windows services, one of them will send pictures and word files to other and other service will give a string answer. 我正在开发2个Windows服务,其中一个会将图片和Word文件发送给其他,而其他服务将给出字符串答案。 That services are in same computer.
这些服务在同一台计算机中。
I will develop same program's Linux version also. 我还将开发相同程序的Linux版本。
Which way is the best for communication between services in Linux and Windows. 哪种方式最适合Linux和Windows中的服务之间的通信。
By the way I am developing that services with C++. 顺便说一下,我正在用C ++开发该服务。
I would suggest reading up on C++ sockets. 我建议阅读C ++套接字。 You're probably going to want to use TCP sockets, since you want to ensure that the data being transferred does so correctly.
您可能要使用TCP套接字,因为您要确保正在传输的数据正确执行。
Try checking these links out: 尝试检查以下链接:
You should search for IPC . 您应该搜索IPC 。
There are a lot of possibilities for inter process communication. 进程间通信有很多可能性。 Because you are not very specific about your problem and your requirements but I would suggest to take a look at boost::interprocess .
因为您对问题和要求不是很明确,但是我建议您看一下boost :: interprocess 。
As long as you are sure that both services run on the same machine this will do it. 只要您确定两个服务都在同一台计算机上运行,就可以做到。
If you want to switch to a distributed approach you need something different. 如果您想切换到分布式方法,则需要一些不同的东西。
Like XML-RPC , thrift or corba . 像XML-RPC , thrift或corba一样 。 Just to mention some possibilities.
仅提及一些可能性。
There're different options for your task: 您的任务有不同的选择:
I would recommend to use TCP communication as more flexible solution. 我建议使用TCP通信作为更灵活的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.