Skip to content

SHOULD DOCUMENT: UNIX SOCKETS ARE NOW SUPPORTED IN WINDOWS VIA ipc:// WITHOUT CHANGE TO PHP-ZMQ #239

Open
@ClosetGeek-Git

Description

@ClosetGeek-Git

AF_UNIX comes to Windows
https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

libzmq quietly added support in 4.3.3, php-zmq seemingly supports without change

Image

Windows 11, PHP 8.4 AMD Ryzen 5 16 gb ddr3 ram. Push and Pull approx. 10,000 messages per second. Requires Windows 10

server.php

<?php

$server = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_PULL);
$server->bind("ipc://test.ipc");

$looped = 0;
/* Loop receiving and echoing back */
while ($message = $server->recv()) {
    echo $looped++."\r";
}

client.php

<?php

$client = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_PUSH);
$client ->connect("ipc://test.ipc");

while (1) {
    $client ->send("test");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions