Documentation
¶
Overview ¶
package nattest provides the capability to test a nat-traversed UDP connection by sending packets back and forth between client and server. The client sends 10 packets containing "Ping" to the server, spaced out by 2 seconds. Once the server receives a Ping packet, it responds with 10 packets containing "Pong", spaced out by 2 seconds, and then terminates. Once the client receives a "Pong" packet, it considers the traversal successful.
Note - both the client and server ignore unexpected (gibberish) packets, so as long as client and server both get at least one good packet, the connection is considered successful.
Index ¶
Constants ¶
View Source
const ( NumUDPTestPackets = 10 PacketPause = 2 * time.Second ConnTimeout = NumUDPTestPackets * PacketPause )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.