<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # RPC 這里是將SdTcpRpcPool進行了再次封裝,需要注意client.php中需要有名為consul的配置方案。 ``` //用于consul微服務的rpc配置 $config['tcpClient']['consul']['set'] = [ 'open_length_check' => 1, 'package_length_type' => 'N', 'package_length_offset' => 0, //第N個字節是包長度的值 'package_body_offset' => 0, //第幾個字節開始計算長度 'package_max_length' => 2000000, //協議最大長度 ]; ``` 服務提供商代碼MathService ```php /** * RPC Add * @param $one * @param $two */ public function add($one,$two) { $this->send($one+$two); } ``` 服務調用方代碼 ```php public function http_testRPC() { $rest = ConsulServices::getInstance()->getRPCService('MathService', $this->context); $reuslt = yield $rest->add(1, 2); $this->http_output->end($reuslt); } ``` 可以通過call函數實現oneway ``` $rest = ConsulServices::getInstance()->getRPCService('MathService', $this->context); $reuslt = yield $rest->call('add',[1, 2],true); $this->http_output->end($reuslt); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看