simbiat/sse 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

simbiat/sse

最新稳定版本:1.1.1+20250417

Composer 安装命令:

composer require simbiat/sse

包简介

Cron utilizing a database to store tasks.

README 文档

README

Simple implementation of Server-Sent Events in PHP.
Open stream with \Simbiat\http\SSE:open(). Optionally pass true to it, if you want to use a counter for event IDs (that is ID 1, ID 2, so on).
Close stream with \Simbiat\http\SSE:close(). Optionally pass true if you want to not only close the stream, but exit the script entirely.
To send a message to stream use \Simbiat\http\SSE:send($message, $event, $retry, $id), where $message is a string containing the message of the event, $event is an optional string with event name, $retry is an optional int of milliseconds, used for a retry timer, in case of disconnect, and $id is an optional event ID. If $id is null or contains only whitespace, either a counter will be used (if true was passed to open()) or server's high resolution time.
Note that all new line symbols will be removed from the message, event and ID, and they also will be trimmed.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2024-11-29