we will consider two specific scenarios, and how applications can be designed to handle both of them gracefully. in the first situation, representing the common case, two clients desiring direct peer-to- peer communication reside behind two different nats. in the second, the two clients actually reside behind the same nat, but do not necessarily know that they do.
这里将考虑两种典型场景,来介绍连接的双方应用程序如何按照计划的进行通信的,第一种场景,我们假设两个客户端都处于不同的nat之后;第二种场景,我们假设两个客户端都处于同一个nat之后,但是它们彼此都不知道(他们在同一个nat中)。
3.3.1. peers behind different nats 处于不同nat之后的客户端通信
suppose clients a and b both have private ip addresses and lie behind different network address translators. the peer-to-peer application running on clients a and b and on server s each use udp port 1234.? a and b have each initiated udp communication sessions with server s, causing nat a to assign its own public udp port 62000 for a's session with s, and causing nat b to assign its port 31000 to b's session with s, respectively.