erickmajor/phpsocket.io

PHPSocket.IO 是一个用 PHP/JavaScript 编写的库,它允许客户端和服务器通过 WebSocket 进行实时通信。

资助包维护!
Ko Fi

0.0.1 2020-03-10 03:28 UTC

This package is auto-updated.

Last update: 2024-09-16 20:34:33 UTC


README

PHPSocket.IO 是一个用 PHP/JavaScript 编写的库,它允许客户端和服务器通过 WebSocket 进行实时通信。

它部分受 NODE.JS 版本 https://socketio.node.org.cn/ 的启发,并且以类似的方式工作。

这个库的 PHP 方面也使用了 https://github.com/ghedipunk/PHP-Websockets 作为基类。

它是由 Anthony Ogundipe 开发并维护的,他是 DHTMLExtreme 的首席执行官。

特性

  • 客户端和服务器之间的高速通信。
  • 易于实现和配置,特别是对于现有的库。
  • 它可以很容易地与现有的库集成。
  • 它可以用于移动应用开发,例如安卓/iOS 客户端。

快速入门

  • 下载zip master
  • 将 zip master 解压缩到您的网页目录中
  • 打开 examples 文件夹以检查基本和高级功能。

简单用法

You need to start the server from the commandline and not from inside the browser.

$: php server/socketio.php

From linux, you may want to use: nohup php server/socketio.php 

The server is meant to be running continuously so that it waits for connection, if you close the server, then the functionality will stop.

After you have successfully started the server, you can run the client from the browser examples/basic/index.html or examples/advanced/index.html

支持

访问项目页面以获取文档、配置和更高级的用法示例。

安卓集成

如果您是安卓用户,您可以通过检查项目页面了解如何将此实用工具集成到您的安卓项目中。

作者

Anthony Ogundipe 即 dhtml

特别感谢 Adewale Wilson (wasconet) 对这个库的贡献。

社区

您可以在 Facebook 上与我们聊天 http://facebook.com/dhtml5

许可证

本存储库中 phpsocket.io 的代码使用 MIT 许可证,请参阅我们的 LICENSE 文件。

修正