两个客户端与websocket连接 [英] two client connect with websocket

查看:744
本文介绍了两个客户端与websocket连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经在服务器上开发了一个Web应用程序.我的问题是,是否可以通过使用websocket相互通信而不是连接到服务器来连接两个客户端.他们应该互相倾听.我的意思是,例如,在页面加载了两个用户的浏览器之后,页面应该处于通信状态.

感谢

Hi,

I have been developed a web application on a server. My question is that Is it possible to connect two client by using websocket to communicate each other instead connecting to server. They should listen the other reciprocally. I mean, for instance after the page loaded two user''s browser, the pages should be in communication.

Thanks

推荐答案

作为WebSocket PubSub(Publish Subscribe)模型,基于消息处理,任何节点都可以是发布者,其他节点可以是发布者.是的,有可能.对于WebSocket .NET的实现,您可以参考 DotNet WebSocket编程 [
As WebSocket PubSub(Publish Subscribe) model, any node can be publisher and other can be subscriber based on the message processing. Yes, it is possible. For WebSocket .NET implementation, you can refer at DotNet WebSocket Programming[^]


这篇关于两个客户端与websocket连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆