Class interface for the Router2 system. More...
#include <Router2.h>
Inherits PluginInterface2.

Class interface for the Router2 system.
Definition at line 39 of file Router2.h.
| Router2::Router2 | ( | ) |
Definition at line 65 of file Router2.cpp.
| Router2::~Router2 | ( | ) | [virtual] |
| void Router2::ClearAll | ( | void | ) | [protected] |
Definition at line 1030 of file Router2.cpp.


| void Router2::ClearConnectionRequests | ( | void | ) | [protected] |
Definition at line 85 of file Router2.cpp.


| void Router2::ClearForwardedConnections | ( | void | ) | [protected] |
Definition at line 1026 of file Router2.cpp.


| void Router2::ClearMinipunches | ( | void | ) | [protected] |
Definition at line 81 of file Router2.cpp.


| bool Router2::ConnectInternal | ( | RakNetGUID | endpointGuid, | |
| bool | returnConnectionLostOnFailure | |||
| ) | [protected] |
Definition at line 93 of file Router2.cpp.


| void Router2::EstablishRouting | ( | RakNetGUID | endpointGuid | ) |
Query all connected systems to connect through them to a third system. System will return ID_ROUTER_2_FORWARDING_NO_PATH if unable to connect. Else you will get ID_ROUTER_2_FORWARDING_ESTABLISHED.
On ID_ROUTER_2_FORWARDING_ESTABLISHED, EstablishRouting as follows:
RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(MessageID)); RakNetGUID endpointGuid; bs.Read(endpointGuid); unsigned short sourceToDestPort; bs.Read(sourceToDestPort); char ipAddressString[32]; packet->systemAddress.ToString(false, ipAddressString); rakPeerInterface->EstablishRouting(ipAddressString, sourceToDestPort, 0,0);
Definition at line 157 of file Router2.cpp.

| unsigned int Router2::GetConnectionRequestIndex | ( | RakNetGUID | endpointGuid | ) |
Definition at line 997 of file Router2.cpp.


| Router2DebugInterface * Router2::GetDebugInterface | ( | void | ) | const |
Get the pointer passed to SetDebugInterface().
Definition at line 1040 of file Router2.cpp.
| int Router2::GetLargestPingAmongConnectedSystems | ( | void | ) | const [protected] |
Definition at line 976 of file Router2.cpp.


| void Router2::OnClosedConnection | ( | SystemAddress | systemAddress, | |
| RakNetGUID | rakNetGUID, | |||
| PI2_LostConnectionReason | lostConnectionReason | |||
| ) | [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 PluginInterface2.
Definition at line 368 of file Router2.cpp.

| void Router2::OnFailedConnectionAttempt | ( | Packet * | packet, | |
| PI2_FailedConnectionAttemptReason | failedConnectionAttemptReason | |||
| ) | [virtual] |
Called when a connection attempt fails
| [in] | packet | Packet to be returned to the user |
| [in] | failedConnectionReason | Why the connection failed |
Reimplemented from PluginInterface2.
Definition at line 458 of file Router2.cpp.

| bool Router2::OnForwardingSuccess | ( | Packet * | packet | ) | [protected] |
Definition at line 919 of file Router2.cpp.


| void Router2::OnMiniPunchReply | ( | Packet * | packet | ) | [protected] |
Definition at line 905 of file Router2.cpp.


| void Router2::OnMiniPunchReplyBounce | ( | Packet * | packet | ) | [protected] |
Definition at line 865 of file Router2.cpp.


| void Router2::OnNewConnection | ( | SystemAddress | systemAddress, | |
| RakNetGUID | rakNetGUID, | |||
| bool | isIncoming | |||
| ) | [virtual] |
Called when we got a new connection
| [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 PluginInterface2.
Definition at line 481 of file Router2.cpp.
| void Router2::OnQueryForwarding | ( | Packet * | packet | ) | [protected] |
Definition at line 634 of file Router2.cpp.


| void Router2::OnQueryForwardingReply | ( | Packet * | packet | ) | [protected] |
Definition at line 666 of file Router2.cpp.


| void Router2::OnRakPeerShutdown | ( | void | ) | [virtual] |
Called when RakPeer is shutdown.
Reimplemented from PluginInterface2.
Definition at line 496 of file Router2.cpp.

| PluginReceiveResult Router2::OnReceive | ( | Packet * | packet | ) | [virtual] |
OnReceive is called for every packet.
| [in] | packet | the packet that is being returned to the user |
The routed system wants more time to stay alive on no communication, in case the router drops or crashes
Reimplemented from PluginInterface2.
Definition at line 185 of file Router2.cpp.

| void Router2::OnRequestForwarding | ( | Packet * | packet | ) | [protected] |
Definition at line 793 of file Router2.cpp.


| void Router2::OnReroute | ( | Packet * | packet | ) | [protected] |
Definition at line 772 of file Router2.cpp.


| void Router2::RemoveConnectionRequest | ( | unsigned int | connectionRequestIndex | ) | [protected] |
Definition at line 546 of file Router2.cpp.


| void Router2::RequestForwarding | ( | unsigned int | connectionRequestIndex | ) | [protected] |
Definition at line 563 of file Router2.cpp.


| int Router2::ReturnFailureOnCannotForward | ( | RakNetGUID | sourceGuid, | |
| RakNetGUID | endpointGuid | |||
| ) | [protected] |
Definition at line 612 of file Router2.cpp.


| void Router2::ReturnToUser | ( | MessageID | messageId, | |
| RakNetGUID | endpointGuid, | |||
| SystemAddress | systemAddress | |||
| ) | [protected] |
Definition at line 1017 of file Router2.cpp.


| void Router2::SendFailureOnCannotForward | ( | RakNetGUID | sourceGuid, | |
| RakNetGUID | endpointGuid | |||
| ) | [protected] |
Definition at line 603 of file Router2.cpp.


| void Router2::SendForwardingSuccess | ( | RakNetGUID | sourceGuid, | |
| RakNetGUID | endpointGuid, | |||
| unsigned short | sourceToDstPort | |||
| ) | [protected] |
Definition at line 717 of file Router2.cpp.


| void Router2::SendOOBFromRakNetPort | ( | OutOfBandIdentifiers | oob, | |
| BitStream * | extraData, | |||
| SystemAddress | sa | |||
| ) | [protected] |
Definition at line 731 of file Router2.cpp.


| void Router2::SendOOBFromSpecifiedSocket | ( | OutOfBandIdentifiers | oob, | |
| SystemAddress | sa, | |||
| SOCKET | socket | |||
| ) | [protected] |
Definition at line 744 of file Router2.cpp.


| void Router2::SendOOBMessages | ( | Router2::MiniPunchRequest * | mpr | ) | [protected] |
Definition at line 751 of file Router2.cpp.


| void Router2::SetDebugInterface | ( | Router2DebugInterface * | _debugInterface | ) |
For testing and debugging.
Definition at line 1036 of file Router2.cpp.
| void Router2::SetMaximumForwardingRequests | ( | int | max | ) |
Set the maximum number of bidirectional connections this system will support Defaults to 0
Definition at line 169 of file Router2.cpp.

| void Router2::Update | ( | void | ) | [virtual] |
Update is called every time a packet is checked for .
Reimplemented from PluginInterface2.
Definition at line 302 of file Router2.cpp.

| bool Router2::UpdateForwarding | ( | unsigned int | connectionRequestIndex | ) | [protected] |
Definition at line 500 of file Router2.cpp.


Router2DebugInterface* RakNet::Router2::debugInterface [protected] |
int RakNet::Router2::maximumForwardingRequests [protected] |
UDPForwarder* RakNet::Router2::udpForwarder [protected] |
1.7.1