gcc 4.7.2
c89
I am looking for a lightweight message queue (IPC), that is cross-platform (linux, windows).
我正在寻找一个轻量级消息队列(IPC),即跨平台(linux、windows)。
I have used msgget, msgsnd, and msgrcv. But this is not cross-platform so wouldn't work on windows.
我用过msgget、msgsnd和msgrcv。但这并不是跨平台的,所以不能在windows上运行。
I don't need any socket layer (tcp, udp). As all the messaging will be on the same server.
我不需要任何套接字层(tcp, udp)。因为所有消息都将在同一台服务器上。
Basically, I have an event loop and I will block (separate thread) until I get a message from the message queue (msgrcv). Then process that event. The messages will come from another shared library that I have created that I will monitor events from in my event loop.
基本上,我有一个事件循环,我将阻塞(单独的线程),直到从消息队列(msgrcv)获得消息。然后处理该事件。消息将来自我创建的另一个共享库,我将在事件循环中监视事件。
I just want to be able to send message to the message queue (msgsnd) and then receive them (msgrcv) in my event loop.
我只想能够向消息队列(msgsnd)发送消息,然后在事件循环中接收它们(msgrcv)。
2 个解决方案
#1
3
AFAIK there're two such things: ØMQ and Gearman.
AFAIK有两个这样的事情:ØMQ和Gearman。
ØMQ is the socket library that acts as a concurrency framework, suitable for asynch I/O for scalable multicore message-passing apps. It supports most OSes including Linux, Windows, OS X.
ØMQ是套接字库,作为并发性框架,适用于中I / O为可伸缩的多核消息传递应用程序。它支持大多数操作系统,包括Linux、Windows、OS X。
Gearman allows you to do work in parallel, to load balance processing, and to call functions between languages. In other words, it is the nervous system for how distributed processing communicates.
Gearman允许您并行地进行工作,以加载平衡处理,并在语言之间调用函数。换句话说,它是神经系统如何分配处理沟通。
#2
0
You can check our MsgConnect (free licenses are available). MsgConnect is a cross-platform (including Linux and Windows) message-oriented middleware framework, designed for easy sending of messages on the same computer or across network.
您可以查看我们的MsgConnect(免费许可)。MsgConnect是一个面向消息的跨平台(包括Linux和Windows)中间件框架,设计用于在同一台计算机上或跨网络发送消息。
#1
3
AFAIK there're two such things: ØMQ and Gearman.
AFAIK有两个这样的事情:ØMQ和Gearman。
ØMQ is the socket library that acts as a concurrency framework, suitable for asynch I/O for scalable multicore message-passing apps. It supports most OSes including Linux, Windows, OS X.
ØMQ是套接字库,作为并发性框架,适用于中I / O为可伸缩的多核消息传递应用程序。它支持大多数操作系统,包括Linux、Windows、OS X。
Gearman allows you to do work in parallel, to load balance processing, and to call functions between languages. In other words, it is the nervous system for how distributed processing communicates.
Gearman允许您并行地进行工作,以加载平衡处理,并在语言之间调用函数。换句话说,它是神经系统如何分配处理沟通。
#2
0
You can check our MsgConnect (free licenses are available). MsgConnect is a cross-platform (including Linux and Windows) message-oriented middleware framework, designed for easy sending of messages on the same computer or across network.
您可以查看我们的MsgConnect(免费许可)。MsgConnect是一个面向消息的跨平台(包括Linux和Windows)中间件框架,设计用于在同一台计算机上或跨网络发送消息。