Can HTML5 Websockets connect 2 clients (browsers) directly without using a server? (P2P)

后端 未结 3 1364
失恋的感觉
失恋的感觉 2020-12-02 13:11

Using HTML5 Websockets, can I open a socket directly between 2 clients (browsers) (assuming I know their IP addresses and there are no NAT traversal issues). I want to send

3条回答
  •  囚心锁ツ
    2020-12-02 13:29

    No

    Already answered here for more details: Do websockets allow for p2p (browser to browser) communication?

    Update:

    The WebRTC protocol and API is making rapid progress and allows a Data Channel to be established between two peers (you still may need a STUN/TURN server for the initial NAT traversal and setup).

提交回复
热议问题