#include <PluginInterface.h>
Public Member Functions | |
virtual void | OnAttach (RakPeerInterface *peer) |
virtual void | OnDetach (RakPeerInterface *peer) |
virtual void | OnStartup (RakPeerInterface *peer) |
virtual void | Update (RakPeerInterface *peer) |
virtual PluginReceiveResult | OnReceive (RakPeerInterface *peer, Packet *packet) |
virtual void | OnShutdown (RakPeerInterface *peer) |
virtual void | OnCloseConnection (RakPeerInterface *peer, SystemAddress systemAddress) |
virtual void | OnDirectSocketSend (const char *data, const unsigned bitsUsed, SystemAddress remoteSystemAddress) |
virtual void | OnDirectSocketReceive (const char *data, const unsigned bitsUsed, SystemAddress remoteSystemAddress) |
virtual void | OnInternalPacket (InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNetTime time, bool isSend) |
void PluginInterface::OnAttach | ( | RakPeerInterface * | peer | ) | [virtual] |
Called when the interface is attached
[in] | peer | the instance of RakPeer that is calling Receive |
Reimplemented in RakNet::AutoRPC, DirectoryDeltaTransfer, FileListTransfer, LightweightDatabaseClient, LightweightDatabaseServer, MessageFilter, NatPunchthrough, PacketLogger, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, Router, RakNet::LobbyClientPC, and RakNet::LobbyServer.
void PluginInterface::OnDetach | ( | RakPeerInterface * | peer | ) | [virtual] |
Called when the interface is detached
[in] | peer | the instance of RakPeer that is calling Receive |
Reimplemented in MessageFilter, and Router.
void PluginInterface::OnStartup | ( | RakPeerInterface * | peer | ) | [virtual] |
void PluginInterface::Update | ( | RakPeerInterface * | peer | ) | [virtual] |
Update is called every time a packet is checked for .
[in] | peer | - the instance of RakPeer that is calling Receive |
Reimplemented in ConnectionGraph, DirectoryDeltaTransfer, FileListTransfer, FullyConnectedMesh, LightweightDatabaseServer, MessageFilter, NatPunchthrough, PacketLogger, ReplicaManager, RakNet::ReplicaManager2, Router, ThreadsafePacketLogger, RakNet::LobbyServer, and RakNet::LobbyServerPostgreSQL.
PluginReceiveResult PluginInterface::OnReceive | ( | RakPeerInterface * | peer, | |
Packet * | packet | |||
) | [virtual] |
OnReceive is called for every packet.
[in] | peer | the instance of RakPeer that is calling Receive |
[in] | packet | the packet that is being returned to the user |
Reimplemented in RakNet::AutoRPC, ConnectionGraph, DirectoryDeltaTransfer, FileListTransfer, FullyConnectedMesh, LightweightDatabaseClient, LightweightDatabaseServer, MessageFilter, NatPunchthrough, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, Router, RakNet::LobbyClientPC, and RakNet::LobbyServer.
void PluginInterface::OnShutdown | ( | RakPeerInterface * | peer | ) | [virtual] |
Called when RakPeer is shutdown
[in] | peer | the instance of RakPeer that is calling Receive |
Reimplemented in RakNet::AutoRPC, ConnectionGraph, DirectoryDeltaTransfer, FileListTransfer, FullyConnectedMesh, LightweightDatabaseServer, MessageFilter, NatPunchthrough, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, Router, RakNet::LobbyClientPC, and RakNet::LobbyServer.
void PluginInterface::OnCloseConnection | ( | RakPeerInterface * | peer, | |
SystemAddress | systemAddress | |||
) | [virtual] |
Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system
[in] | peer | the instance of RakPeer that is calling Receive |
[in] | systemAddress | The system whose connection was closed |
Reimplemented in RakNet::AutoRPC, ConnectionGraph, FileListTransfer, LightweightDatabaseServer, MessageFilter, NatPunchthrough, ReadyEvent, ReplicaManager, RakNet::ReplicaManager2, Router, RakNet::LobbyClientPC, and RakNet::LobbyServer.
void PluginInterface::OnDirectSocketSend | ( | const char * | data, | |
const unsigned | bitsUsed, | |||
SystemAddress | remoteSystemAddress | |||
) | [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.
void PluginInterface::OnDirectSocketReceive | ( | const char * | data, | |
const unsigned | bitsUsed, | |||
SystemAddress | remoteSystemAddress | |||
) | [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.
void PluginInterface::OnInternalPacket | ( | InternalPacket * | internalPacket, | |
unsigned | frameNumber, | |||
SystemAddress | remoteSystemAddress, | |||
RakNetTime | time, | |||
bool | isSend | |||
) | [virtual] |
Called on a send or recieve 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.