#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.
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) |
RakPeerInterface * | GetRakPeerInterface (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) |
Packet * | AllocatePacketUnified (unsigned dataSize) |
void | PushBackPacketUnified (Packet *packet, bool pushAtHead) |
void | DeallocPacketUnified (Packet *packet) |
Protected Attributes | |
RakPeerInterface * | rakPeerInterface |
PacketizedTCP * | packetizedTCP |
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.
PluginInterface2::PluginInterface2 | ( | ) |
Definition at line 13 of file PluginInterface2.cpp.
PluginInterface2::~PluginInterface2 | ( | ) | [virtual] |
Definition at line 20 of file PluginInterface2.cpp.
Packet * PluginInterface2::AllocatePacketUnified | ( | unsigned | dataSize | ) | [protected] |
void PluginInterface2::DeallocPacketUnified | ( | Packet * | packet | ) | [protected] |
RakPeerInterface* PluginInterface2::GetRakPeerInterface | ( | void | ) | const [inline] |
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
[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
[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.
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
[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
[in] | peer | the instance of RakPeer that is calling Receive |
Reimplemented in NatPunchthroughClient, and RakNet::UDPProxyServer.
Definition at line 89 of file PluginInterface2.h.
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
[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
[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
[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
[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
[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
[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] |
Called when RakPeer is shutdown.
Reimplemented in RakNet::AutoRPC, ConnectionGraph, FileListTransfer, FullyConnectedMesh2, NatPunchthroughClient, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, RakNet::ReplicaManager3, RakNet::Router2, RakNet::UDPProxyClient, and RakNet::UDPProxyServer.
Definition at line 103 of file PluginInterface2.h.
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] |
OnReceive is called for every packet.
[in] | packet | the packet that is being returned to the user |
Reimplemented in RakNet::AutoRPC, ConnectionGraph, ConnectionGraph2, DirectoryDeltaTransfer, FileListTransfer, FullyConnectedMesh, FullyConnectedMesh2, LightweightDatabaseServer, MessageFilter, NatPunchthroughClient, NatPunchthroughServer, RakNet::NatTypeDetectionClient, RakNet::NatTypeDetectionServer, RakNetTransport2, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, RakNet::ReplicaManager3, RakNet::Router2, RakNet::RPC4Plugin, RakNet::TeamBalancer, RakNet::UDPProxyClient, RakNet::UDPProxyCoordinator, and RakNet::UDPProxyServer.
Definition at line 97 of file PluginInterface2.h.
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
[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.
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.
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.
void PluginInterface2::SetPacketizedTCP | ( | PacketizedTCP * | ptr | ) |
void PluginInterface2::SetRakPeerInterface | ( | RakPeerInterface * | ptr | ) |
virtual void PluginInterface2::Update | ( | void | ) | [inline, virtual] |
Update is called every time a packet is checked for .
Reimplemented in ConnectionGraph, FileListTransfer, LightweightDatabaseServer, MessageFilter, NatPunchthroughClient, NatPunchthroughServer, RakNet::NatTypeDetectionClient, RakNet::NatTypeDetectionServer, ReplicaManager, RakNet::ReplicaManager2, RakNet::ReplicaManager3, RakNet::Router2, ThreadsafePacketLogger, RakNet::UDPProxyClient, RakNet::UDPProxyCoordinator, and RakNet::UDPProxyServer.
Definition at line 92 of file PluginInterface2.h.
PacketizedTCP* PluginInterface2::packetizedTCP [protected] |
Definition at line 180 of file PluginInterface2.h.
RakPeerInterface* PluginInterface2::rakPeerInterface [protected] |
Definition at line 178 of file PluginInterface2.h.