Server code for NATPunchthrough.
More...
#include <NatPunchthroughServer.h>
List of all members.
Detailed Description
Maintain connection to NatPunchthroughServer to process incoming connection attempts through NatPunchthroughClient
Server maintains two sockets clients can connect to so as to estimate the next port choice
Server tells other client about port estimate, current public port to the server, and a time to start connection attempts
- See also:
- NatTypeDetectionClient See also http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html
Definition at line 70 of file NatPunchthroughServer.h.
Constructor & Destructor Documentation
| RakNet::NatPunchthroughServer::NatPunchthroughServer |
( |
| ) |
|
| virtual RakNet::NatPunchthroughServer::~NatPunchthroughServer |
( |
| ) |
[virtual] |
Member Function Documentation
| static int RakNet::NatPunchthroughServer::NatPunchthroughUserComp |
( |
const RakNetGUID & |
key, |
|
|
User *const & |
data |
|
) |
| [static] |
| void RakNet::NatPunchthroughServer::OnClientReady |
( |
Packet * |
packet | ) |
[protected] |
Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system
- Parameters:
-
| [in] | systemAddress | The system whose connection was closed |
| [in] | rakNetGuid | The guid of the specified system |
| [in] | lostConnectionReason | How the connection was closed: manually, connection lost, or notification of disconnection |
Reimplemented from RakNet::PluginInterface2.
| void RakNet::NatPunchthroughServer::OnGetMostRecentPort |
( |
Packet * |
packet | ) |
[protected] |
| void RakNet::NatPunchthroughServer::OnNATPunchthroughRequest |
( |
Packet * |
packet | ) |
[protected] |
| virtual void RakNet::NatPunchthroughServer::OnNewConnection |
( |
const SystemAddress & |
systemAddress, |
|
|
RakNetGUID |
rakNetGUID, |
|
|
bool |
isIncoming |
|
) |
| [virtual] |
Called when we got a new connection
- Parameters:
-
| [in] | systemAddress | Address of the new connection |
| [in] | rakNetGuid | The guid of the specified system |
| [in] | isIncoming | If true, this is ID_NEW_INCOMING_CONNECTION, or the equivalent |
Reimplemented from RakNet::PluginInterface2.
OnReceive is called for every packet.
- Parameters:
-
| [in] | packet | the packet that is being returned to the user |
- Returns:
- True to allow the game and other plugins to get this message, false to absorb it
Reimplemented from RakNet::PluginInterface2.
| void RakNet::NatPunchthroughServer::SendTimestamps |
( |
void |
| ) |
[protected] |
Sets a callback to be called with debug messages
- Parameters:
-
| [in] | i | Pointer to an interface. The pointer is stored, so don't delete it while in progress. Pass 0 to clear. |
| void RakNet::NatPunchthroughServer::StartPendingPunchthrough |
( |
void |
| ) |
[protected] |
| void RakNet::NatPunchthroughServer::StartPunchthroughForUser |
( |
User * |
user | ) |
[protected] |
| virtual void RakNet::NatPunchthroughServer::Update |
( |
void |
| ) |
[virtual] |
Member Data Documentation
The documentation for this class was generated from the following file: