daemon.php 457 B

1234567891011121314151617181920212223242526
  1. <?php
  2. class Daemon{
  3. protected $handler = null;
  4. public function init(){
  5. $this->handler = new \Redis();
  6. $this->handler->connect('39.97.239.116', 6379);
  7. $this->handler->auth('huaxiashangmeng');
  8. $this->handler->select(1);
  9. }
  10. public function btoc($listname){
  11. $result = $this->handler->BRPOP($listname,0);
  12. if($result){
  13. }
  14. }
  15. }
  16. $daemon = new Daemon();
  17. $daemon->init();
  18. while (true){
  19. }