Ver código fonte

测试推送

lizhen_gitee 1 ano atrás
pai
commit
2ee5df7f3e
1 arquivos alterados com 17 adições e 0 exclusões
  1. 17 0
      application/index/controller/News.php

+ 17 - 0
application/index/controller/News.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace app\index\controller;
+
+use think\Controller;
+
+use \GatewayClient\Gateway;
+class News extends Controller
+{
+    public function test(){
+
+        $Gateway = new Gateway();
+        $Gateway::$registerAddress = '127.0.0.1:2345';
+        $Gateway::sendToAll('来自服务端client的主动推送'.date('Y-m-d H:i:s'));
+
+    }
+}