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

套件詳情v1.0.1

web_socket

一個容易使用的 WebSocket 通訊庫,支援多種實作。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1170萬
喜歡數
67
Pub 分數
160

安裝套件

flutter pub add web_socket

套件介紹

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

一個簡單且彈性的 Dart 套件,可用於在多個平台建立和管理 WebSocket 連接。它為客戶端與伺服器之間的即時通訊提供一致的 API,支援客戶端與伺服器端實作。設計上注重易用性,能順暢整合至 Flutter 應用程式及其他 Dart 專案,以最少的樣板程式碼實現雙向資料交換。此套件由 Dart 團隊維護,支援所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux。

適用情境

  • 即時聊天應用
  • 即時資料流
  • 在線遊戲
  • 物聯網設備通訊
  • 同步儀表板
  • 伺服器發送事件

主要特色

  • 跨平台相容性
  • 連接管理的簡單API
  • 同時支援客戶端和伺服器角色
  • 內建錯誤處理
  • 自動重連嘗試
  • 輕便高效

適合對象

  • 開發即時功能的開發者
  • 需要持久連接的應用程式
  • 需要低延遲更新的項目
  • 使用 Dart/Flutter 進行全端開發的團隊
  • 面向多個平台的應用程式

使用建議

  • 需要一個 WebSocket 伺服器端點
  • 可能需要自定義邏輯進行訊息序列化
  • 不適用於單次HTTP請求
  • 性能取決於網路狀況
  • 身份驗證和安全必須分開處理

原始 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.

所屬分類

依賴

依賴清單 1 項

  • web>=0.5.0 <2.0.0

原始碼儲存庫

使用此套件的專案