作者 何书鹏

5

@@ -69,14 +69,7 @@ class Server @@ -69,14 +69,7 @@ class Server
69 // 当$sender_io启动后监听一个http端口,通过这个端口可以给任意uid或者所有uid推送数据 69 // 当$sender_io启动后监听一个http端口,通过这个端口可以给任意uid或者所有uid推送数据
70 $sender_io->on('workerStart', function() use ($sender_io) { 70 $sender_io->on('workerStart', function() use ($sender_io) {
71 // 监听一个http端口 71 // 监听一个http端口
72 - $context = array(  
73 - 'ssl' => array(  
74 - 'local_cert' => '/usr/local/nginx/cert/chengyigou.cn/chengyigou.cn.crt',  
75 - 'local_pk' => '/usr/local/nginx/cert/chengyigou.cn/chengyigou.cn.key',  
76 - 'verify_peer' => false,  
77 - )  
78 - );  
79 - $inner_http_worker = new Worker('https://0.0.0.0:2121',$context); 72 + $inner_http_worker = new Worker('https://0.0.0.0:2121');
80 // 当http客户端发来数据时触发 73 // 当http客户端发来数据时触发
81 $inner_http_worker->onMessage = function(TcpConnection $http_connection, Request $request) use ($sender_io) { 74 $inner_http_worker->onMessage = function(TcpConnection $http_connection, Request $request) use ($sender_io) {
82 // global $uidConnectionMap; 75 // global $uidConnectionMap;