#include <NATDetectClient.h>


Public Types | |
| enum | NATType { kOpen = 0, kModerate, kStrict } |
Public Member Functions | |
| bool | Start (const int channel=TransportAnyGameChannel) |
| void | SetServers (const XPAddress &address1, const XPAddress &address2) |
| Sets the address and port of the servers. The default for the instance of the class is localhost and port NATDetectServer::kDefaultPort and NATDetectServer::kDefaultPort+1. | |
| bool | GetCompleted (void) |
| NATDetectServer::Reply | GetReply (void) |
| NATType | GetNATType (void) const |
| If GetReply() == NATDetectServer::kReply_Success this returns the type of NAT calculated by this class. | |
| XPAddress | GetPublicAddress (void) const |
| Returns the public internet address of this computer as seen by the NATDetectServer. | |
| virtual void | CallbackCompleted (void) |
| A virtual callback that is triggered when the NASTDetect calculation is complete. GetReply(), GetNATType() and GetPublicAddress() can be used during this callback or at any time after completion. | |
| bool Start | ( | const int | channel = TransportAnyGameChannel |
) |
If using a specific game channel for ReplicaNet/XPSession then remember to stop the NATDetectClient service before calling ReplicaNet::SessionCreate()/XPSessionCreate() so the game channel is free for ReplicaNet/XPSession to use.
| bool GetCompleted | ( | void | ) |
Tests the completion state of the last query. When the query completes the result can be retrieved by using GetReply()
| NATDetectServer::Reply GetReply | ( | void | ) |
Returns the last reply from a completed query.
1.5.3