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