Connect two client sockets

前端 未结 12 1491
执笔经年
执笔经年 2020-12-10 03:58

Let\'s say Java has two kind of sockets:

  • server sockets \"ServerSocket\"
  • client sockets or just \"Socket\"

Imagine the situation of two

12条回答
  •  死守一世寂寞
    2020-12-10 04:35

    If you want a peer-to-peer connection you might want to consider using UDP.

    UDP can receive from anything without establishing a connection first, you will still need a server to tell the clients who they're receiving data from though.

    Hope this helped.

提交回复
热议问题