zmq-fileserver/request_file
2020-06-19 17:04:39 +02:00

13 lines
296 B
PHP
Executable File

#!/usr/bin/env php
<?php
$argc < 3 and die('Usage: request_file <namespace> <name>' . PHP_EOL);
$req = (new ZMQContext)->getSocket(ZMQ::SOCKET_REQ)
->connect('ipc:///tmp/storage_server_query.ipc')
->send(@$argv[1], ZMQ::MODE_SNDMORE)
->send(@$argv[2]);
print($req->recv());
print(PHP_EOL);