Simple IPC between C++ and Python (cross platform)

前端 未结 7 1058
梦谈多话
梦谈多话 2020-12-02 07:50

I have a C++ process running in the background that will be generating \'events\' infrequently that a Python process running on the same box will need to pick up.

7条回答
  •  爱一瞬间的悲伤
    2020-12-02 08:22

    How complex is your data? If it is simple I would serialize it as a string. If it was moderately complex I would use JSON. TCP is a good cross-platform IPC transport. Since you say that this IPC is rare the performance isn't very important, and TCP+JSON will be fine.

提交回复
热议问题