public function onConnect(Connection $conn)
    {
        // 加入新连接重新调整所有连接rdy状态
        $conn->setDelegate($this);
        $conn->writeCmd(Command::subscribe($this->topic, $this->channel));
        $this->maybeUpdateRDY($conn);
    }
public function onConnect(Connection $conn)
    {
        // 加入新连接重新调整所有连接rdy状态
        $conn->setDelegate($this);
        $conn->writeCmd(Command::subscribe($this->topic, $this->channel));
        $this->maybeUpdateRDY($conn);
    }
public function onConnect ( Connection $ conn ) { // 加入新连接重新调整所有连接rdy状态 $ conn -> setDelegate ( $ this ) ; $ conn -> writeCmd ( Command :: subscribe ( $ this -> topic , $ this -> channel ) ) ; $ this -> maybeUpdateRDY ( $ conn ) ; }
onConnected is called when nsqd connects
@param Connection $conn
@return void
onConnected is called when nsqd connects