Xfire uses direct user-to-user P2P communication via UDP messages. This is used for the file download system, personal file transfers, voice chat, and typing notifications. When you start Xfire, it detects what kind of "NAT device" you are behind, if any.
The two main categories of NAT devices are Cone NATs and Symmetric NATs. The difference between these two types is whether the NAT device (i.e. router/firewall) maintains a consistent port mapping between itself and the client machine. The client creates a single UDP socket for all P2P communication. For Cone NATs, the outbound port on the NAT device is the same for all messages sent from that socket. This is good for P2P because the port is known, and can be broadcast to all other peers that wish to communicate. For Symmetric NATs, the outbound port on the NAT device is different for each destination that messages are delivered to, making it impossible to know which outbound port will be used for any new peer a user wishes to communicate with.
Full Cone or Restricted Cone NATs are the best for P2P; they can connect with Xfire types 1, 2, 3, and 4. Any Xfire user can turn themselves into a type 1 by port-forwarding.
Port-Restricted Cone NATs are adequate for P2P; they can connect with Xfire types 1 and 4.
Symmetric NATs are not ideal for P2P; they can connect with Xfire type 1 only.
If the Xfire app is unable to determine your NAT type, then you cannot do P2P at all, likely due to overly-restrictive firewall settings. Try port-forwarding to turn into a type 1.
For users that fail natcheck (type 0), they are shown a corresponding Error Code. The most common errors are:
| Code | Description |
|---|---|
| 1 | Failed to create a local socket. Check permissions and system resources. Consider re-booting your computer. |
| 7 | Your ISP is relaying your messages with inconsistent external IP addresses. This makes using Xfire's P2P system impossible. |
| 11 | Messages sent to nat1.xfire.com are timing out or being blocked. Make sure your firewall is allowing xfire.exe to send and receive UDP packets. |
| 12 | Messages sent to nat2.xfire.com are timing out or being blocked. Make sure your firewall is allowing xfire.exe to send and receive UDP packets. |
| 15 | An unexpected error occurred. Check permissions and system resources. Consider re-booting your computer. |
| 17 | Failed to configure a local socket. Check permissions and system resources. Consider re-booting your computer. |
| 18 | Invalid values specified in xfire.ini. Remove any entries that set Nat1, Nat2, or Nat3. |