本文介绍了Android的对等网络连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要让我跑,Jetty Web服务器通过GPRS channel.But许多移动运营商阻止对phones.Is那里的入站连接,周围没有任何办法两款Android手机之间的对等网络连接?

I need to make a peer-to-peer connection between two android phones running i-jetty web server through gprs channel.But many mobile operators block the inbound connections to the phones.Is there any way around it?

推荐答案

NAT穿透力是足够复杂,你真的不应该惹它,直到你很熟悉网络的内部。该使用的是pretty艺术的许多国家,这些天。

NAT penetration is complex enough that you really shouldn't mess with it until you're quite familiar with the internals of networking. The autonomous NAT traversal used by pwnat is pretty much the state of the art these days.

的基本思想是使用一个事实,即路由器可能具有的任何IP地址和尽可能在NAT都知道,任何的源IP地址是有效的一个ICMP错误消息,这在NAT将转发到它的客户机。

The basic idea is to use the fact that a router might have any IP address and as far as a NAT knows, any source IP address is valid for an ICMP error message, which the NAT will forward to its client.

请注意,你通常只能打通UDP。所以你必须实现自己的字节流协议。

Note that you can usually only get UDP through. So you'll have to implement your own byte-stream protocol.

这篇关于Android的对等网络连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 13:34