搜尋套件、儲存庫與 APP 分類

套件詳情v3.0.0

shelf_web_socket

一個 shelf 處理程序,為每個連接設定監聽器。

AndroidiOSmacOSWindowsLinux
近 30 天下載
1320萬
喜歡數
158
Pub 分數
160

安裝套件

flutter pub add shelf_web_socket

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

ShelfWebSocket 是一個 Dart 套件,將 WebSocket 功能整合至 Shelf 網站伺服器框架中。它提供了一個處理常式來管理 WebSocket 連線,讓客戶端與伺服器之間能進行即時通訊。每個傳入的連線都會觸發一個監聽器,讓開發者能有效處理訊息、廣播及連線生命週期事件。專為 Shelf 設計,支援在 Android、iOS、macOS、Windows 和 Linux 上跨平台部署。適用於需要即時更新、聊天系統或即時資料同步的應用程式。

適用情境

  • 即時聊天應用
  • 即時資料流
  • 互動式網路儀表板
  • 多人遊戲後端
  • 物聯網設備通訊

主要特色

  • 與 Shelf 的無縫整合
  • 每個連接的監聽器處理
  • 跨平台支援
  • 簡單訊息廣播
  • 內建的連接生命週期管理

適合對象

  • 使用 Shelf 建構後端服務的開發人員
  • 即時應用開發者
  • 全端 Dart 開發人員
  • 伺服器端 Dart 項目
  • Web 和移動後端開發

使用建議

  • 需要了解 Shelf 框架
  • 不適用於獨立的 WebSocket 伺服器
  • 僅限基於 Dart 的伺服器環境
  • 可能需要額外的安全措施
  • 依賴於架櫃套件版本相容性

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Build Status

About Shelf

Shelf makes it easy to create and compose web servers and parts of web servers. How?

  • Expose a small set of simple types.
  • Map server logic into a simple function: a single argument for the request, the response is the return value.
  • Trivially mix and match synchronous and asynchronous processing.
  • Flexibility to return a simple string or a byte stream with the same model.

It was inspired by Connect for NodeJS and Rack for Ruby.

See the package:shelf readme for more information.

Packages

Package Description Issues Version
shelf A model for web server middleware that encourages composition and easy reuse. issues pub package
shelf_packages_handler A shelf handler for serving a packages/ directory. issues pub package
shelf_proxy A shelf handler for proxying HTTP requests to another server. issues pub package
shelf_router A convenient request router for the shelf web-framework, with support for URL-parameters, nested routers and routers generated from source annotations. issues pub package
shelf_router_generator A package:build-compatible builder for generating request routers for the shelf web-framework based on source annotations. issues pub package
shelf_static Static file server support for the shelf package and ecosystem. issues pub package
shelf_test_handler A Shelf handler that makes it easy to test HTTP interactions. issues pub package
shelf_web_socket A shelf handler that wires up a listener for every connection. issues pub package
_shelf_compliance HTTP/1.1 compliance and hardening tests. issues (not published)

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

所在榜單