zmq-fileserver/save_file

11 lines
294 B
Plaintext
Raw Normal View History

2020-06-19 17:04:39 +02:00
#!/usr/bin/env php
<?php
$argc < 4 and die('Usage: save_file NAMESPACE NAME CONTENTS' . PHP_EOL);
(new ZMQContext)
->getSocket(ZMQ::SOCKET_PUSH)->connect('ipc:///tmp/storage_server_sink.ipc')
->send(@$argv[1], ZMQ::MODE_SNDMORE)
->send(@$argv[2], ZMQ::MODE_SNDMORE)
->send(@$argv[3]);