#include <RPC4Plugin.h>
Public Member Functions | |
bool | RegisterFunction (const char *uniqueID, void(*functionPointer)(RakNet::BitStream *userData, Packet *packet)) |
Register a function pointer to be callable from a remote system. | |
bool | UnregisterFunction (const char *uniqueID) |
Unregister a function pointer previously registered with RegisterFunction(). | |
void | CallLoopback (const char *uniqueID, RakNet::BitStream *bitStream) |
void | Call (const char *uniqueID, RakNet::BitStream *bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast) |
Protected Member Functions | |
virtual PluginReceiveResult | OnReceive (Packet *packet) |
It is for users that want to use RPC, but do not want to use boost. You do not have the automatic serialization or other features of RPC3, and C++ member calls are not supported.
void RakNet::RPC4Plugin::Call | ( | const char * | uniqueID, | |
RakNet::BitStream * | bitStream, | |||
PacketPriority | priority, | |||
PacketReliability | reliability, | |||
char | orderingChannel, | |||
const AddressOrGUID | systemIdentifier, | |||
bool | broadcast | |||
) |
Send to the specified remote instance of RakPeer.
[in] | Identifier | originally passed to RegisterFunction() on the remote system(s) |
[in] | bitStream | bitStream encoded data to send to the function callback |
[in] | priority | See RakPeerInterface::Send() |
[in] | reliability | See RakPeerInterface::Send() |
[in] | orderingChannel | See RakPeerInterface::Send() |
[in] | systemIdentifier | See RakPeerInterface::Send() |
[in] | broadcast | See RakPeerInterface::Send() |
void RakNet::RPC4Plugin::CallLoopback | ( | const char * | uniqueID, | |
RakNet::BitStream * | bitStream | |||
) |
Send to the attached instance of RakPeer. See RakPeerInterface::SendLoopback()
[in] | Identifier | originally passed to RegisterFunction() on the local system |
[in] | bitStream | bitStream encoded data to send to the function callback |
virtual PluginReceiveResult RakNet::RPC4Plugin::OnReceive | ( | Packet * | packet | ) | [protected, virtual] |
OnReceive is called for every packet.
[in] | packet | the packet that is being returned to the user |
Reimplemented from PluginInterface2.
bool RakNet::RPC4Plugin::RegisterFunction | ( | const char * | uniqueID, | |
void(*)(RakNet::BitStream *userData, Packet *packet) | functionPointer | |||
) |
Register a function pointer to be callable from a remote system.
The hash of the function name will be stored as an association with the function pointer When a call is made to call this function from the Call() or CallLoopback() function, the function pointer will be invoked with the passed bitStream to Call() and the actual Packet that RakNet got.
[in] | uniqueID | Identifier to be associated with functionPointer. If this identifier is already in use, the call will return false. |
[in] | functionPointer | C function pointer to be called |
bool RakNet::RPC4Plugin::UnregisterFunction | ( | const char * | uniqueID | ) |
Unregister a function pointer previously registered with RegisterFunction().
[in] | Identifier | originally passed to RegisterFunction() |