作者 何书鹏

1

@@ -19,14 +19,7 @@ class Server @@ -19,14 +19,7 @@ class Server
19 public function index(){ 19 public function index(){
20 header("Access-Control-Allow-Origin: *"); 20 header("Access-Control-Allow-Origin: *");
21 // PHPSocketIO服务 21 // PHPSocketIO服务
22 - $context = array(  
23 - 'ssl' => array(  
24 - 'local_cert' => '/usr/local/nginx/uploads/chengyigou.cn/chengyigou.cn.crt',  
25 - 'local_pk' => '/usr/local/nginx/cert/chengyigou.cn/chengyigou.cn.key',  
26 - 'verify_peer' => false,  
27 - )  
28 - );  
29 - $sender_io = new SocketIO(2120,$context); 22 + $sender_io = new SocketIO(2120);
30 // 客户端发起连接事件时,设置连接socket的各种事件回调 23 // 客户端发起连接事件时,设置连接socket的各种事件回调
31 $sender_io->on('connection', function($socket){ 24 $sender_io->on('connection', function($socket){
32 // 当客户端发来登录事件时触发 25 // 当客户端发来登录事件时触发