TCP P2P without server

前端 未结 2 2065
我寻月下人不归
我寻月下人不归 2021-01-01 06:03

is it possible to write TCP P2P program without server? When I was googling this question I found something about NAT traversal,UPnP, can I use them somehow?

2条回答
  •  感动是毒
    2021-01-01 06:36

    It really depends what you mean by 'server'. You dont need a centralized server by any means. The term 'p2p', by its very definition, implies no centralized server.

    But the apps that receive data from other apps need to be able to listen for incoming tcp/ip connections... thats typically considered 'server' functionality, even if you arent calling it a 'server'. So in your case, your p2p app would need to have both server and client (initiating connections) capabilities built into it.

提交回复
热议问题