12345678910111213141516171819202122 |
- <?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'));
- }
- public function ip(){
- $ipaddress = ip_to_address();
- echo $ipaddress;
- }
- }
|