Does zeromq support IPC as a transport channel on windows?
Asked Answered
I

3

19

I get the following error message, when I try the router example wiht python on Windows (Windows 8):

Traceback (most recent call last):
  File "router.py", line 43, in <module>
    client.bind("ipc://routing.ipc")
  File "socket.pyx", line 432, in zmq.core.socket.Socket.bind (zmq\core\socket.c:3870)
  File "checkrc.pxd", line 23, in zmq.core.checkrc._check_rc (zmq\core\socket.c:5712)
zmq.error.ZMQError: Protocol not supported

So I suppose that the IPC transport channel for zeromq is not suported on Windows (at least Windows 8). Is this true?

Iceland answered 13/3, 2013 at 13:1 Comment(3)
The problem is that Windows native IPC methods do not support event notification thus cannot integrate with a reactor.Freezedry
@Steve-o: Windows named pipes support asynchronous I/O and trigger completion notifications to I/O completion ports (IOCP). They integrate just fine with a proactor (or reactor) framework. The ZeroMQ implementation for Windows probably uses the BSD(-ish) socket API and rather than using an IOCP, which would be a better explanation as to why ZeroMQ doesn't support the IPC transport on Windows.Saltant
ZMQ now supports IPC on Windows - see most recent answerBromberg
M
18

The question How to use Zeromq's inproc and ipc transports? mentions that IPC relies on POSIX named pipes, which Windows doesn't support.

You should be able to use TCP on a Loopback Interface instead without trouble.

Metritis answered 13/3, 2013 at 13:7 Comment(2)
Indeed - the question becomes, why would you ever use IPC instead of TCP for anything? According to this, TCP between localhost processes is just as fast as IPC anyway!Pirog
As a more recent answer below says, IPC is now supported for Windows. Also, this answer suggests that TCP on Windows is actually rather slow: https://mcmap.net/q/665878/-speed-of-socket-send-recv-on-windowsBromberg
P
15

It is not supported on Windows, but TCP over localhost gives much the same performance as IPC, on Linux and OS/X and I'd just use that on Windows too.

Perce answered 14/3, 2013 at 10:30 Comment(0)
A
10

With Win 10 now supporting AF_UNIX libzmq was updated to support IPC. It was added to the 4.3.3 release. For more information see this pull

Anstice answered 12/2, 2021 at 14:44 Comment(1)
The current docs unfortunately do not make Windows support overly clear: libzmq.readthedocs.io/en/latest/zmq_ipc.html - currently only implemented on operating systems that provide UNIX domain socketsBromberg

© 2022 - 2024 — McMap. All rights reserved.