RakNet
4.0
|
Server code for NatTypeDetection. More...
#include <NatTypeDetectionServer.h>
Public Member Functions | |
void | Startup (const char *nonRakNetIP2, const char *nonRakNetIP3, const char *nonRakNetIP4) |
virtual void | Update (void) |
Update is called every time a packet is checked for . | |
virtual PluginReceiveResult | OnReceive (Packet *packet) |
virtual void | OnClosedConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason) |
![]() | |
virtual void | OnAttach (void) |
Called when the interface is attached. | |
virtual void | OnDetach (void) |
Called when the interface is detached. | |
virtual void | OnRakPeerStartup (void) |
Called when RakPeer is initialized. | |
virtual void | OnRakPeerShutdown (void) |
Called when RakPeer is shutdown. | |
virtual void | OnNewConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming) |
virtual void | OnFailedConnectionAttempt (Packet *packet, PI2_FailedConnectionAttemptReason failedConnectionAttemptReason) |
virtual bool | UsesReliabilityLayer (void) const |
virtual void | OnDirectSocketSend (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) |
virtual void | OnDirectSocketReceive (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) |
virtual void | OnReliabilityLayerNotification (const char *errorMessage, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress, bool isError) |
virtual void | OnInternalPacket (InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time, int isSend) |
virtual void | OnAck (unsigned int messageNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time) |
virtual void | OnPushBackPacket (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) |
Server code for NatTypeDetection.
Sends to a remote system on certain ports and addresses to determine what type of router, if any, that client is behind Requires that the server have 4 external IP addresses
See also http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html
|
virtual |
Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system
[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.
|
virtual |
OnReceive is called for every packet.
[in] | packet | the packet that is being returned to the user |
Reimplemented from RakNet::PluginInterface2.
void RakNet::NatTypeDetectionServer::Startup | ( | const char * | nonRakNetIP2, |
const char * | nonRakNetIP3, | ||
const char * | nonRakNetIP4 | ||
) |
Start the system, binding to 3 external IPs not already in useS
[in] | nonRakNetIP2 | First unused external IP |
[in] | nonRakNetIP3 | Second unused external IP |
[in] | nonRakNetIP4 | Third unused external IP |