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

套件詳情v3.0.3

web_socket_channel

WebSockets 的 StreamChannel 包裝器。提供跨平台的 WebSocketChannel API,以及基於底層 StreamChannel 通訊的跨平台 API 實作。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1290萬
喜歡數
1650
Pub 分數
150

安裝套件

flutter pub add web_socket_channel

套件介紹

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

web_socket_channel 套件為 WebSocket 通訊提供一個跨平台 API,包裝 StreamChannel 以實現跨平台一致性的 WebSocket 處理。它提供統一介面,用於建立和管理 WebSocket 連接,抽象底層平台差異。基於 Dart 的 StreamChannel 建構,它透過串流支援雙向資料傳輸,非常適合即時應用。此套件專為針對 Android、iOS、Web、macOS、Windows 和 Linux 的 Flutter 應用設計,確保與現有基於串流的架構無縫整合。

適用情境

  • 即時聊天應用
  • 儀表板中的即時資料更新
  • 多人遊戲同步
  • 物聯網設備通訊
  • 串流分析資料

主要特色

  • 跨平台 WebSocket 支持
  • 基於 StreamChannel 的 API
  • 雙向資料流
  • 跨平台的一致性介面
  • 內建的錯誤處理和重連邏輯

適合對象

  • Flutter 開發人員建構即時功能
  • 需要持久伺服器連接的應用程式
  • 針對多個平台的專案
  • 基於流的資料架構
  • 需要可靠 WebSocket 傳輸的應用程式

使用建議

  • 需要底層的 StreamChannel 實現
  • 可能需要額外的錯誤處理以用於生產環境
  • 不適用於非WebSocket協議
  • 依賴於 Dart 的非同步功能
  • 僅限 WebSocket 特定用例

原始 README

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

Build Status

A composable, Future-based library for making HTTP requests.

package:http contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, and the browser.

Packages

Package Description Version
cronet_http An Android Flutter plugin that provides access to the Cronet HTTP client. pub package
cupertino_http A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. pub package
flutter_http_example An Flutter app that demonstrates how to configure and use package:http. —
http A composable, multi-platform, Future-based API for HTTP requests. pub package
http2 A HTTP/2 implementation in Dart. pub package
http_client_conformance_tests A library that tests whether implementations of package:http's Client class behave as expected.
http_multi_server A dart:io HttpServer wrapper that handles requests from multiple servers. pub package
http_parser A platform-independent package for parsing and serializing HTTP formats. pub package
http_profile A library used by HTTP client authors to integrate with the DevTools Network View. pub package
ok_http An Android Flutter plugin that provides access to the OkHttp HTTP client and the OkHttp WebSocket API. pub package
web_socket Any easy-to-use library for communicating with WebSockets that has multiple implementations. pub package
web_socket_channel StreamChannel wrappers for WebSockets. Provides a cross-platform WebSocketChannel API. package issues
web_socket_conformance_tests A library that tests whether implementations of package:web_socket's WebSocket class behave as expected.

Contributing

If you'd like to contribute to any of these packages, see the Contributing Guide.

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案