You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
546 B

  1. #!/usr/bin/env php
  2. <?PHP
  3. /*
  4. * @Descripttion:
  5. * @version:
  6. * @Author: Blobt
  7. * @Date: 2020-07-30 09:48:18
  8. * @LastEditors: Blobt
  9. * @LastEditTime: 2020-07-30 14:20:19
  10. */
  11. include __DIR__."/../vendor/autoload.php";
  12. use blobt\airpc\RpcServer;
  13. if(!isset($argv[1]))
  14. die("Error: {$argv[0]} {your enter point}.\n");
  15. if(!file_exists($argv[1]))
  16. die("Error: enter point {$argv[1]} not found.\n");
  17. $server = new RpcServer("0.0.0.0", 5188);
  18. $server->reactorNum = 1;
  19. $server->workerNum = 1;
  20. $server->entryPoint = $argv[1];
  21. $server->run();
  22. ?>