<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          RSocket面向連接的、消息驅動的協(xié)議

          聯(lián)合創(chuàng)作 · 2023-09-29 07:26

          RSocket 就是為服務而設計的。它是面向連接的、消息驅動的協(xié)議,內置了應用程序級的流控制。它在瀏覽器中和在服務器上一樣工作。事實上,Web 瀏覽器可以服務于后端微服務的流量。它也是二進制的。它可以同樣好地處理文本和二進制數據,并且可以分解有效工作負載。它將應用程序中的所有交互建模為網絡原語。這意味著,你可以流化數據或執(zhí)行發(fā)布 / 訂閱,而無需設置應用程序隊列。

          目前提供 JavaJavaScriptC++Kotlin 版本實現。

          服務端示例代碼:

          RSocketFactory.receive()
              .frameDecoder(Frame::retain)
              .acceptor(new PingHandler())
              .transport(TcpServerTransport.create(7878))
              .start()
              .block()
              .onClose();

          客戶端示例代碼:

          Mono<RSocket> client =
              RSocketFactory.connect()
                  .frameDecoder(Frame::retain)
                  .transport(TcpClientTransport.create(7878))
                  .start();PingClient pingClient = new PingClient(client);Recorder recorder = pingClient.startTracker(Duration.ofSeconds(1));int count = 1_000;pingClient    .startPingPong(count, recorder)
              .doOnTerminate(() -> System.out.println("Sent " + count + " messages."))
              .blockLast();
          瀏覽 29
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  日韩高清AV在线 | 丁香五月无码 | 日韩熟女视频 | 成人18禁免费精品网站 | 色哟哟 国产精品 |