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;
}
}
我怎么覺(jué)得是
if (static::$globalEvent && flase === $this->_pauseAccept && $this->_mainSocket) {
這樣才對(duì) $this->_pauseAccept =ture 不是暫停的嗎 都暫停了 還怎么進(jìn)行
1個(gè)回答
年代過(guò)于久遠(yuǎn),無(wú)法發(fā)表回答