有 PHP 用户与用户在套接字上聊天的示例吗?

发布于 2024-09-04 16:13:20 字数 30 浏览 3 评论 0原文

有 PHP 用户与用户在套接字上聊天的示例吗?

Is there any Example of PHP user to user chat on sockets?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

惜醉颜 2024-09-11 16:13:20

网络上不存在“用户对用户”的聊天。基于网络的聊天都通过网络服务器进行,​​因为没有一种实用且万无一失的方法可以让两个客户端浏览器打开两者之间的直接通信链接。

如果您正在处理基于网络的通信,最好接受所有通信都是客户端<->的事实。服务器,而不是客户端<->客户。

话虽这么说,您可以使用 crossdomain.xml,但这仍然需要服务器的参与。

There's no such thing as "user to user" chats on the Web. Web-based chats all pass through a webserver, as there's no practical foolproof way to get two client browsers to open up a direct communications link between the two.

If you're dealing with web-based communications, better accept that all communications are client <-> server, not client <-> client.

That being said, you can have Flash open up links to other servers, using crossdomain.xml, but that still requires server involvement.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文