本文介绍了使用Cromis IPC的双向通讯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了 Iztok Kacin的Cromis IPC 组件.

我已经下载了此组件集,以允许我的Windows服务和GUI进行通信.但是,似乎通信是一种方式(除了服务器响应之外).

I've downloaded this component set to allow my windows service and GUI to communicate. However it seems that the communication is one way(apart from server responses).

我可以很高兴地将消息从客户端发送到侦听服务器,但是除非能够作为响应,否则我似乎无法将消息发送回客户端.

I can quite happily send a message from a client to a listening server, but I don't appear to be able to send a message back to the client unless it is as a response.

有人知道这些组件是否可以实现两种方式的通讯,还是我在GUI和服务应用程序中都需要服务器和客户端?

Does anyone know if two way comms are achievable with these components or am I going to need a server and a client in both the GUI and service apps?

推荐答案

我是组件的作者,正如其他人已经告诉您的那样,目前无法进行双向通信.原因很简单,其命名管道的方式.维护客户端与服务器之间的永久连接将非常复杂,坦率地说IPC并非如此.但是由于有时需要通知您有新数据可用,因此我正在考虑滚动独立的信号机制.这样服务器可以通知客户端有适合他的东西.然后,客户端将以与现在相同的方式访问数据.现在,我赞成将其实现为一个完全独立的组件,然后可以与我的IPC一起轻松使用.

I am the author of the components and as others already told you there is no way to do two way communication at the moment. The reason is simple, its the way named pipes work. It would be very complicated to maintain a permanent connection between client and server and frankly IPC is not about that. But as there are times when you need to be notified that new data is available, I am thinking about rolling independent signaling mechanism. This way server could notify the client that there is something for him. Client would then access the data in the same way as it does now. Right now I am in favor of implementing this as a completely separate component that would then be easily used alongside my IPC.

关注该博客,因为如果我决定这样做,我将在此发布.

Follow the blog as I will post about it there if I decide to do this.

这篇关于使用Cromis IPC的双向通讯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 09:24