Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
RakNet::UDPProxyServer Class Reference

UDPProxyServer to control our instance of UDPForwarder. More...

#include <UDPProxyServer.h>

Inheritance diagram for RakNet::UDPProxyServer:

List of all members.

Public Member Functions

bool LoginToCoordinator (RakNet::RakString password, SystemAddress coordinatorAddress)
virtual void OnAttach (void)
 Called when the interface is attached.
virtual void OnClosedConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason)
virtual void OnDetach (void)
 Called when the interface is detached.
virtual void OnRakPeerShutdown (void)
 Called when RakPeer is shutdown.
virtual void OnRakPeerStartup (void)
 Called when RakPeer is initialized.
virtual PluginReceiveResult OnReceive (Packet *packet)
void SetResultHandler (UDPProxyServerResultHandler *rh)
void SetSocketFamily (unsigned short _socketFamily)
 UDPProxyServer ()
virtual void Update (void)
 Update is called every time a packet is checked for .
 ~UDPProxyServer ()

Static Public Member Functions

static void DestroyInstance (UDPProxyServer *i)
static UDPProxyServerGetInstance (void)

Public Attributes

UDPForwarder udpForwarder

Protected Member Functions

void OnForwardingRequestFromCoordinatorToServer (Packet *packet)

Protected Attributes

DataStructures::Multilist
< ML_ORDERED_LIST,
SystemAddress
loggedInCoordinators
DataStructures::Multilist
< ML_ORDERED_LIST,
SystemAddress
loggingInCoordinators
UDPProxyServerResultHandlerresultHandler
unsigned short socketFamily

Detailed Description

When NAT Punchthrough fails, it is possible to use a non-NAT system to forward messages from us to the recipient, and vice-versa.
The class to forward messages is UDPForwarder, and it is triggered over the network via the UDPProxyServer plugin.
The UDPProxyServer connects to UDPProxyServer to get a list of servers running UDPProxyServer, and the coordinator will relay our forwarding request.

Definition at line 65 of file UDPProxyServer.h.


Constructor & Destructor Documentation

RakNet::UDPProxyServer::UDPProxyServer ( )
RakNet::UDPProxyServer::~UDPProxyServer ( )

Member Function Documentation

static void RakNet::UDPProxyServer::DestroyInstance ( UDPProxyServer i) [static]
static UDPProxyServer* RakNet::UDPProxyServer::GetInstance ( void  ) [static]
bool RakNet::UDPProxyServer::LoginToCoordinator ( RakNet::RakString  password,
SystemAddress  coordinatorAddress 
)

Before the coordinator will register the UDPProxyServer, you must login

Precondition:
Must be connected to the coordinator
Coordinator must have set a password with UDPProxyCoordinator::SetRemoteLoginPassword()
Returns:
false if already logged in, or logging in. Returns true otherwise
virtual void RakNet::UDPProxyServer::OnAttach ( void  ) [virtual]

Reimplemented from RakNet::PluginInterface2.

virtual void RakNet::UDPProxyServer::OnClosedConnection ( const SystemAddress systemAddress,
RakNetGUID  rakNetGUID,
PI2_LostConnectionReason  lostConnectionReason 
) [virtual]

Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system

Parameters:
[in]systemAddressThe system whose connection was closed
[in]rakNetGuidThe guid of the specified system
[in]lostConnectionReasonHow the connection was closed: manually, connection lost, or notification of disconnection

Reimplemented from RakNet::PluginInterface2.

virtual void RakNet::UDPProxyServer::OnDetach ( void  ) [virtual]

Reimplemented from RakNet::PluginInterface2.

void RakNet::UDPProxyServer::OnForwardingRequestFromCoordinatorToServer ( Packet packet) [protected]
virtual void RakNet::UDPProxyServer::OnRakPeerShutdown ( void  ) [virtual]

Reimplemented from RakNet::PluginInterface2.

virtual void RakNet::UDPProxyServer::OnRakPeerStartup ( void  ) [virtual]

Reimplemented from RakNet::PluginInterface2.

virtual PluginReceiveResult RakNet::UDPProxyServer::OnReceive ( Packet packet) [virtual]

OnReceive is called for every packet.

Parameters:
[in]packetthe 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::UDPProxyServer::SetResultHandler ( UDPProxyServerResultHandler rh)

Receives the results of calling LoginToCoordinator() Set before calling LoginToCoordinator or you won't know what happened

Parameters:
[in]resultHandler
void RakNet::UDPProxyServer::SetSocketFamily ( unsigned short  _socketFamily)

Sets the socket family to use, either IPV4 or IPV6

Parameters:
[in]socketFamilyFor IPV4, use AF_INET (default). For IPV6, use AF_INET6. To autoselect, use AF_UNSPEC.
virtual void RakNet::UDPProxyServer::Update ( void  ) [virtual]

Reimplemented from RakNet::PluginInterface2.


Member Data Documentation

Definition at line 108 of file UDPProxyServer.h.

Definition at line 107 of file UDPProxyServer.h.

Definition at line 110 of file UDPProxyServer.h.

unsigned short RakNet::UDPProxyServer::socketFamily [protected]

Definition at line 111 of file UDPProxyServer.h.

Operative class that performs the forwarding Exposed so you can call UDPForwarder::SetMaxForwardEntries() if you want to change away from the default UDPForwarder::Startup(), UDPForwarder::Shutdown(), and UDPForwarder::Update() are called automatically by the plugin

Definition at line 92 of file UDPProxyServer.h.


The documentation for this class was generated from the following file:

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net