Java和C#之间的通信 [英] communication between Java and C#

查看:578
本文介绍了Java和C#之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现有一个名为GCT的.Net工具包 - Group Communication Toolkit,它是JGroup的C#版本。我想知道这个和JGroup是否可以连接在一起,以使java和C#客户端相互通信。
如果没有,那么使java程序和C#程序进行通信的最佳选择是什么?
我遇到的另一个选择是XMPP实现。
我需要在同一台计算机上运行的这两个程序之间传递非常快的消息。主要要求是,当某些特定事件被触发时,该程序中的任何一个都会向另一个发送消息。
欢迎任何想法。

I found out that there is a .Net toolkit called GCT - Group Communication Toolkit that is the C# version of JGroup. I want to know whether this and JGroup can be connected together to make java and C# clients communicate with each other. If not, what would be the best option to make a java program and a C# program communicate? One other option I came across is XMPP implementation. I require very fast message passing between those two programs that are running in the same computer. The main requirement is that either of this program would send a message to the other, when some particular events are triggered. any ideas are welcome.

推荐答案

XMPP不是你想要的。它设计用于在具有中央服务器的计算机之间传递消息。

XMPP isn't what you want. It's designed for passing messages between computers with a central server.

我建议使用套接字在应用程序之间传递数据。请参阅C#中的System.Net.Sockets.Socket类和Java中的java.net.Socket类。

I'd recommend using sockets to pass data between the apps. See the System.Net.Sockets.Socket class in C# and the java.net.Socket class in Java.

这篇关于Java和C#之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆