如何知道GatewayWorker版本

打开GatewayWorker/Gateway.php,在Gateway类内部VERSION常量标记了当前GatewayWorker的版本,例如下面GatewayWorker版本号为2.0.2。

如果没有找到VERSION常量,说明是1.0版本。

GatewayWorker/Gateway.php

  1. <?php
  2. /**
  3. * This file is part of workerman.
  4. *
  5. * Licensed under The MIT License
  6. * For full copyright and license information, please see the MIT-LICENSE.txt
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @author walkor<walkor@workerman.net>
  10. * @copyright walkor<walkor@workerman.net>
  11. * @link http://www.workerman.net/
  12. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  13. */
  14. namespace GatewayWorker;
  15. use Workerman\Connection\TcpConnection;
  16. use \Workerman\Worker;
  17. use \Workerman\Lib\Timer;
  18. use \Workerman\Autoloader;
  19. use \Workerman\Connection\AsyncTcpConnection;
  20. use \GatewayWorker\Protocols\GatewayProtocol;
  21. /**
  22. *
  23. * Gateway,基于Worker开发
  24. * 用于转发客户端的数据给Worker处理,以及转发Worker的数据给客户端
  25. *
  26. * @author walkor<walkor@workerman.net>
  27. *
  28. */
  29. class Gateway extends Worker
  30. {
  31. /**
  32. * ######版本######
  33. * @var string
  34. */
  35. const VERSION = '2.0.2';
  36. ....