Commit d88f642c authored by testshenbd's avatar testshenbd

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev

parents a666bf04 2f520aea
<?php
/**
* 推送10秒推送一次
*
* 推送10秒推送一次
*
* @author chenjiebin <sjlinyu@qq.com>
......@@ -17,9 +17,11 @@ $redis->connect($conf['host'], $conf['port']);
if(!empty($conf['password'])){
$redis->auth($conf['password']);
}
$result=$redis->subscribe(array('pushcenter'), 'callback');
//ini_set('default_socket_timeout', -1);(所有长连接不超时)
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
$result=$redis->subscribe(array('redisPublish'), 'callback');
function printTest($meg){
echo $meg;
echo $meg.'213';
}
function callback($instance,$channelName,$message){
printTest($message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment