开发者

Can be websockets used to create a client to client connection?

I want to make a client to client conection, using the server like a bridge momentarily, and I was seeing websockets but I don't know if that is posible. Any idea开发者_运维问答?


There are plans for this in the spec: http://www.w3.org/TR/2008/WD-html5-20080122/#peer-to-peer but I don't think any browsers support it yet.


You can't connect two clients using websockets without a server being the intermediary. The connection to the server would need to be alive throughout.


Besides the issue how two peers get to know each others IPs and setting aside any NAT-related issues making direct TCP connections between peers problematic, the WebSockets protocol itself is only asymmetric up to and including the initial WS handshake performed. After that, WS is fully symmetric.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜