Python 和 C# 之间的 IPC

发布于 2024-08-10 23:06:15 字数 304 浏览 3 评论 0原文

我想在 Windows 中的 Python 和 C# 应用程序之间传递数据(我希望通道是双向的) 事实上,我想将一个包含我用 C# (SharpPcap) 捕获的网络数据包数据的结构传递给 Python 应用程序,然后将修改后的数据包发送回 C# 程序。 你有什么建议? (我宁愿这是一种快速的方法) 到目前为止,我的搜索表明我可以使用这些技术,但我不知道是哪一种:

  1. JSON-RPC
  2. 使用 WCF (运行项目 在 IronPython 下使用 Ironclad)
  3. WCF(使用 Python for .NET)

I want to pass data between a Python and a C# application in Windows (I want the channel to be bi-directional)
In fact I wanna pass a struct containing data about a network packet that I've captured with C# (SharpPcap) to the Python app and then send back a modified packet to the C# program.
What do you propose ? (I rather it be a fast method)
My searches so far revealed that I can use these technologies, but I don't know which:

  1. JSON-RPC
  2. Use WCF (run the project
    under IronPython using Ironclad)
  3. WCF (use Python for .NET)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

春夜浅 2024-08-17 23:06:15

为什么不使用简单的套接字通信,或者如果您希望可以启动一个简单的 http 服务器,和/或对其执行 json-rpc。

Why not use a simple socket communication, or if you wish you can start a simple http server, and/or do json-rpc over it.

画中仙 2024-08-17 23:06:15

使用 JSON-RPC 因为您获得的经验将有更多的实际用途。 JSON 广泛应用于以十几种最流行语言编写的 Web 应用程序中。

Use JSON-RPC because the experience that you gain will have more practical use. JSON is widely used in web applications written in all of the dozen or so most popular languages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文