如何唤醒并启用.NET Remoting服务器的客户端以异步获取数据?
我需要使用 .NET Remoting 执行进程间通信。为此,我将以数据(对象)和数据(对象)的形式分享一些数据。方法 。
有什么方法可以让我的.NET Remoting客户端检测到是否有一些数据正在共享,如果它只是继续收集这些数据。每次服务器服务器通过其可共享的方法和对象共享数据编组,客户应该意识到这是另一个过程。
服务器可以有多个客户端,并且数据可以在多个客户端(特定客户端或广播,即作为单独进程运行的每个客户端)中共享。
在客户端,我将有一个专用线程来检查共享数据,如果它到达,它将收集,否则睡眠。或者每次服务器以某种方式向特定客户端或多个客户端发送事件,以使它们了解到达和共享的数据。
这是 .NET 远程事件公开的功能吗? 我的 .NET Remoting 服务器是 C# 进程,客户端是 C++/CLI 进程。
问候 乌斯曼
I need to perform inter process communication using .NET Remoting. For this I would share some data in form of Data(Objects) & Methods .
Is there any way out by which my .NET Remoting client can detect that there's some data that is being shared or not, if its just go on and collect that data.Each time server server shares the data with its shared able methods and objects by Marshaling, it should be get aware for client that's another process.
Server can have multiple clients and data can be shared in multiple clients(specific clients or broadcast i.e for every client that is running as separate process).
On client side I would have single dedicated thread for checking shared data, if it arrive it would collect, sleep otherwise. Or somehow each time server sends and event to specific client or multiple clients to make them aware about arrived and shared data.
Is this is the functionality what .NET Remoting Events expose?
My .NET Remoting server is C# process and client is C++/CLI processes.
Regards
Usman
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
.NET Remoting 可以实现这一点。也许最简单的方法是让远程对象(服务器)包含客户端可以订阅的事件。当服务器有希望共享的数据时,它只会触发该事件,并且订阅该事件的任何客户端都会收到通知以及数据。
That is possible with .NET Remoting. Perhaps the easiest way would be to have the remote object (the server) include an event to which clients can subscribe. When the server has data that it wishes to share, it just fires that event and any clients that subscribe to the event get a notification along with the data.