resumeAccept 函數(shù)的邏輯看不懂
public function resumeAccept()
{
// Register a listener to be notified when server socket is ready to read.
if (static::$globalEvent && true === $this->_pauseAccept && $this->_mainSocket) {
if ($this->transport !== 'udp') {
static::$globalEvent->add($this->_mainSocket, EventInterface::EV_READ, array($this, 'acceptConnection'));
} else {
static::$globalEvent->add($this->_mainSocket, EventInterface::EV_READ, array($this, 'acceptUdpConnection'));
}
$this->_pauseAccept = false;
}
}
我怎么覺得是
if (static::$globalEvent && flase === $this->_pauseAccept && $this->_mainSocket) {
這樣才對 $this->_pauseAccept =ture 不是暫停的嗎 都暫停了 還怎么進行
1個回答
年代過于久遠,無法發(fā)表回答