dongtang5057 2017-11-30 02:21
浏览 108

跨平台实现IPC

I am writing a service (daemon) that suppose to run on both *nix and Windows. The service part will have a xxxctl companion program that will need to trigger actions in service and receive a feedback from it.

I have initially looked at signals, however these have 2 problems:

  • they do not seem to be really cross-platform (there are platform specific caveats)
  • they do not offer any way to communicate from signal recipient back to initiator (in C/C++ recipient will see which PID send signal, in Go this is not exposed unless implemented manually using cgo)

I am currently looking towards unix sockets and named pipes. Each respectively available only in their world, which means added complexity to application and dealing with that.

My question is -- other than IP sockets, is there any other option left for organizing IPC communication in cross-platform way using Go?

PS: I would like to avoid using cgo and/or IP sockets as much as possible, though do not completely reject this idea.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记