Add command, query, stable server with argument parsing

This commit is contained in:
2020-06-20 18:07:43 +02:00
parent 3b8438f9e7
commit ae7f92d51d
12 changed files with 197 additions and 159 deletions

13
command Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env php
<?php
array_shift($argv);
if (count($argv) === 0) {
print('Command needs at least one argument' . PHP_EOL);
die(1);
}
$context = new ZMQContext();
$socket = new ZMQSocket($context, ZMQ::SOCKET_PUSH);
$socket->connect('ipc:///tmp/storage_server_command.ipc');
$socket->sendmulti($argv);