<?php

namespace app\crm\lib;
use think\Controller;
use app\common\lib\websocket;
class Runsocket extends Controller {
    // 客资id，录入id，客资所属店shop_code
    function run() {
        $config=array(
          'address'=>config('socket_address')?config('socket_address'):'0.0.0.0',
          'port'=>config('socket_port')?config('socket_port'):'7159',
          'event'=>'websocket_event',//回调函数的函数名
          'log'=>config('socket_log'),
        );
        $websocket = new websocket($config);
        $websocket->run();
    }
}