11 #include "RNPlatform/Inc/MemoryTracking.h"
12 #ifndef _NATDETECTCLIENT_H_
13 #define _NATDETECTCLIENT_H_
14 #include "RNLobby/Inc/NATDetectServer.h"
15 #include "RNXPURL/Inc/Transport.h"
17 namespace RNReplicaNet
40 bool Start(
const int channel = TransportAnyGameChannel);
51 NATDetectServer::Reply
GetReply(
void);
68 bool DoSuccessState(
void);
70 bool CallbackPoll(
void);
72 SysTimeType mLastSentTime;
76 volatile NATDetectServer::Reply mReply;
86 bool mServerAddressSet;
bool Start(const int channel=TransportAnyGameChannel)
Definition: XPSocket.h:91
Definition: NATDetectClient.h:25
NATType GetNATType(void) const
If GetReply() == NATDetectServer::kReply_Success this returns the type of NAT calculated by this clas...
void GetAddressReplies(XPAddress &addr1, XPAddress &addr2)
Gets the two addresses as seen by the NATDetectServer.
virtual void CallbackCompleted(void)
A virtual callback that is triggered when the NATDetect calculation is complete. GetReply(), GetNATType() and GetPublicAddress() can be used during this callback or at any time after completion.
Definition: NATDetectClient.h:60
XPAddress GetPublicAddress(void) const
Returns the public internet address of this computer as seen by the NATDetectServer.
NATDetectServer::Reply GetReply(void)
Definition: MessageHelper.h:211
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 ...
A server base class that handles encrypted messages to and from a socket.
Definition: BaseServer.h:24