A(10.8.18.133)计算机通过网关10.8.18.1上网
异地B(192.168.0.13)计算机通过网关192.168.0.1上网
如何在这两台计算机间建立通讯???
---------------------------------
有源代码吗??参考一下?

解决方案 »

  1.   

    >>客户端和服务器端只能通过宽带网连接http://www.ppcn.net/n1306c2.aspxP2P之UDP穿透NAT的原理与实现(附源代码)
    http://bsdg.org/Jim/Peer2Peer/A Guide to Peer-2-Peer
    Jim McKeeth's BorCon 2003 paperThe paper (updated 5/22/2004) 
    Simple Chat Delphi Source
    Source code to example outlined in the paper 
    Peer Recipe 2 Delphi Source
    Example using the IdHTTPWebBrokerBridge to use a Web Service in a Peer-to-Peer application to exchange recipes.  Very crude example written while I was at BorCon (between sessions). 
    The BorCon power point presentation.  (1,363 KB) 
    PDF version of paper (991 KB)
      

  2.   

    如果是那个什么 非对称型(记不清了) 的NAT,P2P就没戏了。
      

  3.   

    把其中一台机器的某个端口映射到(具有外网地址的)网关上。
    比如A的6000端口映射到网关C上,那么B连接到C的6000时,就等于跟A的6000端口通讯。
      

  4.   

    哈哈,参考以下前面的网站,不错的, 代码到 www.delphifans.com上有