摘要 |
<p>The present invention discloses a data interaction method, including: sending simultaneously an address detection request for a UDP channel and an address detection request for a TCP channel; and when both address detection for the UDP channel and address detection for the TCP channel fail, sending an address detection request for an HTTP channel; when detection of at least one channel succeeds, collecting two types of addresses corresponding to each channel in the at least one channel, where the two types of addresses include a mapping address allocated by a network address translation NAT host at an outermost layer of each channel and a relay address of a local relay device; performing address exchange and address matching with a peer client host; and performing channel connectivity detection based on matched addresses, and selecting a channel with a highest priority from detected effective channels for data interaction with the peer client host. Therefore, efficiency of traversing a NAT host during address detection is improved.</p> |