文件名称:UDP_P2P
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Text]
- 上传时间:
- 2013-09-06
- 文件大小:
- 130kb
- 下载次数:
- 0次
- 提 供 者:
- 允*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
一个模拟p2p聊天的过程的源代码,过程很简单,p2pserver运行在一个拥有公网ip的计算机上,p2pclient运行在两个不同的nat后(注意,如果两个客户端运行在一个nat后,本程序很可能不能运行正常,这取决于你的nat是否支持loopback translation,详见http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt,当然,此问题可以通过双方先尝试连接对方的内网ip来解决,但是这个代码只是为了验证原理,并没有处理这些问题),后登录的计算机可以获得先登录计算机的用户名,后登录的计算机通过send username message的格式来发送消息。如果发送成功,说明你已取得了直接与对方连接的成功-A process simulation p2p chat source code, the process is very simple, p2pserver running on a LAN with a public ip on the computer, p2pclient run on two different nat after (Note that if two clients running on a nat, the program is likely not run properly, depending on whether your nat support loopback translation, see http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt, of course, this problem can be the two sides first try to connect to each other s network ip resolved, but this code is just to verify the principle, and did not deal with these issues), after the logon computer can get logged in the computer s user name, computer and log in through the send username message format to send a message. If the transmission was successful, that you have made to connect directly with each other s success.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
UDP打洞技术实现\UDP打洞技术实现.rar
...............\参考网址+使用说明.txt
UDP打洞技术实现