zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.8k stars 2.36k forks source link

UWP actually supports IPC over UDS (Similar to Win32) #4714

Open mhandb opened 4 months ago

mhandb commented 4 months ago

Issue description

I wanted to use libzmq as a UWP client with the "ipc://" protocol. I have quickly seen that the build disable IPC for UWP. But I do not see why IPC this is problematic for UWP when I read the implementation. Then I changed the CMake to enable IPC for UWP apps and then created a test app.

There is no issue giving that the app has the proper access right on the UDS file. 20240731_173914 And the WACK (Windows App Certification Kit) test passes: image

It is the server responsibility to grant the access right either to a specific UWP app using its SID or to ALL_APPLICATION_PACKAGES

This access right concern is something outside of the scope of zmq, and developers which uses UWP clients to communicate with system service are used to deals with these access rights.

I created a PR to with the modification I made to build it for my UWP client: https://github.com/mhandb/libzmq/pull/1 (Still in draft)

Environment

Minimal test code / Steps to reproduce the issue

  1. build with set(CMAKE_SYSTEM_NAME WindowsStore)
  2. try connect to an IPC endpoint using ipc://<some_absolute_path>

What's the actual result? (include assertion message & call stack if applicable)

An exception is raised saying that the protocol is not supported

What's the expected result?

The IPC protocol should be supported starting from Windows10 (build 17061)