简体   繁体   English

在没有服务器交互的情况下发送客户端到客户端消息

[英]sending client to client messages without server interaction

I am not sure if I can explain this correctly…. 我不确定是否可以正确解释...。 But is there a way to send a message from one client to another without bringing the server into interaction…. 但是有没有一种方法可以将消息从一个客户端发送到另一个客户端,而无需使服务器交互……。 I mean the server will setup the channel between two clients and the clients will communicate using that channel only…. 我的意思是服务器将在两个客户端之间建立通道,而客户端将仅使用该通道进行通信…。 No server interaction what so ever… much of what like pubnub does… so basically what I am trying to do is build something like pubnub … I know it is possible… if I'm not mistaken that is….. So, what are the things I need to get started… oh and I'm not sure what tag to put this question in... basically i want something like the following picture... 从来没有服务器交互过……像pubnub所做的很多事情……所以基本上我想做的就是构建像pubnub这样的东西……我知道这是有可能的……如果我没记错的话……..那么,什么是我需要开始的事情...哦,我不确定将这个问题放入哪个标签...基本上,我想要类似下图的内容...

在此处输入图片说明

You can not do this with PHP, JavaScript or WebSockets. 您无法使用PHP,JavaScript或WebSockets执行此操作。 If you will open a connection between two clients, clients' system must allow a port to open at least. 如果要打开两个客户端之间的连接,则客户端的系统必须至少允许一个端口打开。 Which can not be done any of these. 这些都无法做到。 It requires an access to OS. 它需要访问操作系统。 If you could do this from browser, it would be a security issue. 如果您可以从浏览器中执行此操作,则将是安全问题。

You may can do this with a Java applet if it had to be done through browser. 如果必须通过浏览器完成操作,则可以使用Java applet进行此操作。 Which accesses to underlying JVM which can access to OS functions with proper permissions. 哪个可以访问底层的JVM,哪个可以使用适当的权限访问OS功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM