搜索插件、代码仓与 APP 分类

插件详情v0.3.3

xmpp_stone

Xmpp Stone 是一个完全用 Dart 编写的轻量级 XMPP 客户端库。

近 30 天下载
409
喜欢数
72
Pub 分数
40

安装插件

flutter pub add xmpp_stone

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Xmpp Stone 是一个完全用 Dart 编写的轻量级 XMPP 客户端库,专为 Flutter 应用中的实时通信而设计。它可无缝集成 XMPP(可扩展消息与存在协议)功能,支持即时消息、状态更新和实时数据交换。该库非常适合希望在无繁重依赖的情况下实现高效跨平台实时通信的开发者。凭借其简洁的 API 和对性能的关注,它简化了应用程序中聊天和协作功能的实现。源代码公开托管在 GitHub 上,以确保透明度和可定制性。

适合场景

  • 实时消息应用
  • 存在性和状态跟踪
  • 基于聊天的协作工具
  • 物联网设备通信
  • 跨平台聊天集成

主要特点

  • 轻便且快速
  • 纯 Dart 实现
  • 支持 XMPP 协议
  • 与 Flutter 的轻松集成
  • 开源且可扩展

适合对象

  • 开发聊天应用的开发者
  • 需要实时同步的团队
  • 需要 XMPP 支持的项目
  • Flutter 应用程序需要低延迟
  • 定制实时通信解决方案

使用建议

  • 有限的文档
  • 无官方维护状态
  • 需要 XMPP 服务器设置
  • 不适合复杂的消息工作流
  • 依赖外部XMPP服务器基础设施

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

XmppStone

Lightweight XMPP client library written completely in Dart. My intention is to write simple to use library for future XMPP client based on Flutter.

Supported documents:

  • RFC6120: Extensible Messaging and Presence Protocol (XMPP): Core
  • RFC6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
  • XEP-0198: Stream Management
  • XEP-0085: Chat State Notifications
  • XEP-0318: Best Practices for Client Initiated Presence Probes
  • XEP-0280: Message Carbons

Partly supported:

  • XEP-0030: Service Discovery
  • XEP-0313: Message Archive Management

Actively working on:

  • XEP-0059: Result Set Management
  • XEP-0004: Data Forms

Latest news

  • 2020-10-30: Added support for XEP-0280: Message Carbons
  • 2020-10-30: Added initial support for XEP-0313: Message Archive Management
  • 2020-10-30: Added logging mechanism
  • 2020-07-23: Added support for XEP-0318: Best Practices for Client Initiated Presence Probes
  • 2020-05-02: Added initial support for XEP-0198 : Stream Management
  • 2020-05-02: Added initial support for XEP-0085 : Chat State Notifications
  • 2019-04-02: added support for: XEP-0054: vcard-temp
  • 2019-04-01: added support for SHA-1 and SHA-256 authentication algorithm

Usage

import 'package:xmpp_stone/xmpp_stone.dart' as xmpp;

main() {
  xmpp.Connection connection = new xmpp.Connection("user@domain", "password", 5222);
  connection.open();
}

Features

1. Logging
Log level

Client can set logging level of the library with command:

Log.logLevel = LogLevel.VERBOSE;
XMPP traffic logging

Xmpp traffic can be enabled or disabled with:

Log.logXmpp = false
2. Message Archive Management

Feature is work in progress, API is subject to change.

Initial implementation of Message Archive Management.

RST is not yet implemented.

Usage:

  • Grabbing the module
connection.getMamModule()
  • Querying all messages:
mamManager.queryAll();
  • Querying messages based on date (All parameters are optional):
mamManager.queryByTime(start: startTime, end: endTime, jid: buddyJid);
  • Querying messages based on messageId (All parameters are optional): This method requires urn:xmpp:mam:2#extended to be supported by the serve, soon it will be available to check feature support.
mamManager.queryById(beforeId: beforeId, afterId: afterId, jid: buddyJid});

Checking capabilities of the server:

mamManager.isQueryByDateSupported
mamManager.isQueryByIdSupported
mamManager.isQueryByJidSupported

所属分类

依赖

依赖清单 10 项

源码仓库

使用此插件的项目

暂无相关数据。