Public Member Functions | Protected Member Functions | Protected Attributes

PluginInterface2 Class Reference
[PluginInterface2]

#include <PluginInterface2.h>

Inherited by ConnectionGraph, ConnectionGraph2, DirectoryDeltaTransfer, FileListTransfer, FullyConnectedMesh, FullyConnectedMesh2, LightweightDatabaseClient, LightweightDatabaseServer, MessageFilter, NatPunchthroughClient, NatPunchthroughServer, PacketLogger, RakNet::AutoRPC, RakNet::NatTypeDetectionClient, RakNet::NatTypeDetectionServer, RakNet::ReplicaManager2, RakNet::ReplicaManager3, RakNet::Router2, RakNet::RPC4Plugin, RakNet::TeamBalancer, RakNet::UDPProxyClient, RakNet::UDPProxyCoordinator, RakNet::UDPProxyServer, RakNetTransport2, ReadyEvent, ReplicaManager, and Router.

Collaboration diagram for PluginInterface2:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PluginInterface2 ()
virtual ~PluginInterface2 ()
virtual void OnAttach (void)
virtual void OnDetach (void)
virtual void Update (void)
 Update is called every time a packet is checked for .
virtual PluginReceiveResult OnReceive (Packet *packet)
virtual void OnRakPeerStartup (void)
 Called when RakPeer is initialized.
virtual void OnRakPeerShutdown (void)
 Called when RakPeer is shutdown.
virtual void OnClosedConnection (SystemAddress systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason)
virtual void OnNewConnection (SystemAddress systemAddress, RakNetGUID rakNetGUID, bool isIncoming)
virtual void OnFailedConnectionAttempt (Packet *packet, PI2_FailedConnectionAttemptReason failedConnectionAttemptReason)
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 OnReliabilityLayerPacketError (const char *errorMessage, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
virtual void OnInternalPacket (InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNetTime time, int isSend)
virtual void OnAck (unsigned int messageNumber, SystemAddress remoteSystemAddress, RakNetTime time)
virtual void OnPushBackPacket (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
RakPeerInterfaceGetRakPeerInterface (void) const
void SetRakPeerInterface (RakPeerInterface *ptr)
void SetPacketizedTCP (PacketizedTCP *ptr)

Protected Member Functions

void SendUnified (const RakNet::BitStream *bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast)
bool SendListUnified (const char **data, const int *lengths, const int numParameters, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast)
PacketAllocatePacketUnified (unsigned dataSize)
void PushBackPacketUnified (Packet *packet, bool pushAtHead)
void DeallocPacketUnified (Packet *packet)

Protected Attributes

RakPeerInterfacerakPeerInterface
PacketizedTCPpacketizedTCP

Detailed Description

RakNet's plugin system. Each plugin processes the following events: -Connection attempts -The result of connection attempts -Each incoming message -Updates over time, when RakPeer::Receive() is called

Definition at line 77 of file PluginInterface2.h.


Constructor & Destructor Documentation

PluginInterface2::PluginInterface2 (  ) 

Definition at line 13 of file PluginInterface2.cpp.

PluginInterface2::~PluginInterface2 (  )  [virtual]

Definition at line 20 of file PluginInterface2.cpp.


Member Function Documentation

Packet * PluginInterface2::AllocatePacketUnified ( unsigned  dataSize  )  [protected]

Definition at line 33 of file PluginInterface2.cpp.

Here is the call graph for this function:

void PluginInterface2::DeallocPacketUnified ( Packet packet  )  [protected]

Definition at line 54 of file PluginInterface2.cpp.

Here is the call graph for this function:

RakPeerInterface* PluginInterface2::GetRakPeerInterface ( void   )  const [inline]

Definition at line 159 of file PluginInterface2.h.

Here is the caller graph for this function:

virtual void PluginInterface2::OnAck ( unsigned int  messageNumber,
SystemAddress  remoteSystemAddress,
RakNetTime  time 
) [inline, virtual]

Called when we get an ack for a message we reliabily sent

Parameters:
[in] messageNumber The numerical identifier for which message this is
[in] remoteSystemAddress The player we sent or got this packet from
[in] time The current time as returned by RakNet::GetTime()

Reimplemented in PacketLogger.

Definition at line 151 of file PluginInterface2.h.

virtual void PluginInterface2::OnAttach ( void   )  [inline, virtual]

Called when the interface is attached

Parameters:
[in] peer the instance of RakPeer that is calling Receive

Reimplemented in RakNet::AutoRPC, FullyConnectedMesh2, NatPunchthroughClient, RakNet::ReplicaManager2, and RakNet::UDPProxyServer.

Definition at line 85 of file PluginInterface2.h.

Here is the caller graph for this function:

virtual void PluginInterface2::OnClosedConnection ( SystemAddress  systemAddress,
RakNetGUID  rakNetGUID,
PI2_LostConnectionReason  lostConnectionReason 
) [inline, virtual]

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 in RakNet::AutoRPC, ConnectionGraph, ConnectionGraph2, FileListTransfer, FullyConnectedMesh2, LightweightDatabaseServer, MessageFilter, NatPunchthroughClient, NatPunchthroughServer, RakNet::NatTypeDetectionClient, RakNet::NatTypeDetectionServer, RakNetTransport2, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, RakNet::ReplicaManager3, RakNet::Router2, RakNet::TeamBalancer, RakNet::UDPProxyCoordinator, and RakNet::UDPProxyServer.

Definition at line 109 of file PluginInterface2.h.

virtual void PluginInterface2::OnDetach ( void   )  [inline, virtual]

Called when the interface is detached

Parameters:
[in] peer the instance of RakPeer that is calling Receive

Reimplemented in NatPunchthroughClient, and RakNet::UDPProxyServer.

Definition at line 89 of file PluginInterface2.h.

Here is the caller graph for this function:

virtual void PluginInterface2::OnDirectSocketReceive ( const char *  data,
const BitSize_t  bitsUsed,
SystemAddress  remoteSystemAddress 
) [inline, virtual]

Called on a receive from the socket, per datagram, that does not go through the reliability layer

Parameters:
[in] data The data being sent
[in] bitsUsed How many bits long data is
[in] remoteSystemAddress Which system this message is being sent to

Reimplemented in PacketLogger.

Definition at line 132 of file PluginInterface2.h.

virtual void PluginInterface2::OnDirectSocketSend ( const char *  data,
const BitSize_t  bitsUsed,
SystemAddress  remoteSystemAddress 
) [inline, virtual]

Called on a send to the socket, per datagram, that does not go through the reliability layer

Parameters:
[in] data The data being sent
[in] bitsUsed How many bits long data is
[in] remoteSystemAddress Which system this message is being sent to

Reimplemented in PacketLogger.

Definition at line 126 of file PluginInterface2.h.

virtual void PluginInterface2::OnFailedConnectionAttempt ( Packet packet,
PI2_FailedConnectionAttemptReason  failedConnectionAttemptReason 
) [inline, virtual]

Called when a connection attempt fails

Parameters:
[in] packet Packet to be returned to the user
[in] failedConnectionReason Why the connection failed

Reimplemented in RakNet::Router2.

Definition at line 120 of file PluginInterface2.h.

virtual void PluginInterface2::OnInternalPacket ( InternalPacket internalPacket,
unsigned  frameNumber,
SystemAddress  remoteSystemAddress,
RakNetTime  time,
int  isSend 
) [inline, virtual]

Called on a send or receive of a message within the reliability layer

Parameters:
[in] internalPacket The user message, along with all send data.
[in] frameNumber The number of frames sent or received so far for this player depending on isSend . Indicates the frame of this user message.
[in] remoteSystemAddress The player we sent or got this packet from
[in] time The current time as returned by RakNet::GetTime()
[in] isSend Is this callback representing a send event or receive event?

Reimplemented in PacketLogger.

Definition at line 145 of file PluginInterface2.h.

virtual void PluginInterface2::OnNewConnection ( SystemAddress  systemAddress,
RakNetGUID  rakNetGUID,
bool  isIncoming 
) [inline, 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 in ConnectionGraph, ConnectionGraph2, FullyConnectedMesh2, MessageFilter, NatPunchthroughClient, NatPunchthroughServer, RakNetTransport2, ReplicaManager, RakNet::ReplicaManager2, RakNet::ReplicaManager3, and RakNet::Router2.

Definition at line 115 of file PluginInterface2.h.

virtual void PluginInterface2::OnPushBackPacket ( const char *  data,
const BitSize_t  bitsUsed,
SystemAddress  remoteSystemAddress 
) [inline, virtual]

System called RakPeerInterface::PushBackPacket

Parameters:
[in] data The data being sent
[in] bitsUsed How many bits long data is
[in] remoteSystemAddress The player we sent or got this packet from

Reimplemented in PacketLogger.

Definition at line 157 of file PluginInterface2.h.

virtual void PluginInterface2::OnRakPeerShutdown ( void   )  [inline, virtual]
virtual void PluginInterface2::OnRakPeerStartup ( void   )  [inline, virtual]

Called when RakPeer is initialized.

Reimplemented in FullyConnectedMesh2, and RakNet::UDPProxyServer.

Definition at line 100 of file PluginInterface2.h.

virtual PluginReceiveResult PluginInterface2::OnReceive ( Packet packet  )  [inline, virtual]
virtual void PluginInterface2::OnReliabilityLayerPacketError ( const char *  errorMessage,
const BitSize_t  bitsUsed,
SystemAddress  remoteSystemAddress 
) [inline, virtual]

Called when the reliability layer rejects a send or receive

Parameters:
[in] bitsUsed How many bits long data is
[in] remoteSystemAddress Which system this message is being sent to

Reimplemented in PacketLogger.

Definition at line 137 of file PluginInterface2.h.

void PluginInterface2::PushBackPacketUnified ( Packet packet,
bool  pushAtHead 
) [protected]

Definition at line 45 of file PluginInterface2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool PluginInterface2::SendListUnified ( const char **  data,
const int *  lengths,
const int  numParameters,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast 
) [protected]

Definition at line 63 of file PluginInterface2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PluginInterface2::SendUnified ( const RakNet::BitStream bitStream,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast 
) [protected]

Definition at line 24 of file PluginInterface2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PluginInterface2::SetPacketizedTCP ( PacketizedTCP ptr  ) 

Definition at line 83 of file PluginInterface2.cpp.

Here is the caller graph for this function:

void PluginInterface2::SetRakPeerInterface ( RakPeerInterface ptr  ) 

Definition at line 78 of file PluginInterface2.cpp.

Here is the caller graph for this function:

virtual void PluginInterface2::Update ( void   )  [inline, virtual]

Member Data Documentation

Definition at line 180 of file PluginInterface2.h.

Definition at line 178 of file PluginInterface2.h.


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