Socket连接和XMPP连接的区别

发布于 2024-12-04 14:44:01 字数 139 浏览 2 评论 0原文

我对这两种联系很陌生。我以前使用过 HTTP 连接,现在我想转向一种新的连接类型。我搜索了连接并得到了这两种类型:Socket Connection 和 XMPP Connection。它们之间的主要区别是什么?我想将其用于聊天应用程序,那么推荐哪种类型更好?谢谢

I am new to these two connections. I used to work with HTTP Connection before and now I wanna move to a new type of connection. I searched about connections and got these two types: Socket Connection and XMPP Connection. What is the main difference between them? I wanna use this for a chat application so which type is better recommended? Thanks

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

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

发布评论

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

评论(2

葬花如无物 2024-12-11 14:44:01

XMPP 是一种通信协议,HTTP 也是一种通信协议。 XMPP 和 HTTP 都将在内部使用套接字连接。

您对应用程序协议网络层感到困惑。

XMPP is a protocol for communication and so is HTTP. Both XMPP and HTTP will internally use socket connections.

You are confused between application protocols and network layer.

归途 2024-12-11 14:44:01

套接字是任何现有连接的本质。如果您想使用任何具有主机点和端口的连接,很可能(除非他们自己编写),他们使用 Socket(在给定端口上打开连接,发送消息,并关闭内部连接端口)。

Socket is the essential thing of any existing connections there is. If you want to use any connection that has a host point and a port, very likely (unless they write their own), they use Socket (to open a connection on a given port, send a message, and close the connection port) internally.

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