Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

RakNet::AutoRPC Class Reference
[AutoRPC]

#include <AutoRPC.h>

Inherits PluginInterface2.

Collaboration diagram for RakNet::AutoRPC:
Collaboration graph
[legend]

List of all members.

Classes

struct  LocalRPCFunction
struct  RemoteRPCFunction
struct  RPCIdentifier

Public Member Functions

 AutoRPC ()
virtual ~AutoRPC ()
void SetNetworkIDManager (NetworkIDManager *idMan)
bool RegisterFunction (const char *uniqueIdentifier, void *functionPtr, bool isObjectMember, char parameterCount=-1)
bool UnregisterFunction (const char *uniqueIdentifier, bool isObjectMember)
void SetTimestamp (RakNetTime timeStamp)
void SetSendParams (PacketPriority priority, PacketReliability reliability, char orderingChannel)
void SetRecipientAddress (AddressOrGUID systemIdentifier, bool broadcast)
void SetRecipientObject (NetworkID networkID)
RakNet::BitStreamSetOutgoingExtraData (void)
RakNetTime GetLastSenderTimestamp (void) const
SystemAddress GetLastSenderAddress (void) const
RakPeerInterfaceGetRakPeer (void) const
 Returns the instance of RakPeer this plugin was attached to.
const char * GetCurrentExecution (void) const
RakNet::BitStreamGetIncomingExtraData (void)
bool Call (const char *uniqueIdentifier)
template<class P1 >
bool Call (const char *uniqueIdentifier, P1 p1)
template<class P1 , class P2 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2)
template<class P1 , class P2 , class P3 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2, P3 p3)
template<class P1 , class P2 , class P3 , class P4 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2, P3 p3, P4 p4)
template<class P1 , class P2 , class P3 , class P4 , class P5 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
bool Call (const char *uniqueIdentifier, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID)
template<class P1 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1)
template<class P1 , class P2 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2)
template<class P1 , class P2 , class P3 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2, P3 p3)
template<class P1 , class P2 , class P3 , class P4 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2, P3 p3, P4 p4)
template<class P1 , class P2 , class P3 , class P4 , class P5 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
bool CallExplicit (const char *uniqueIdentifier, RakNetTime timeStamp, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, NetworkID networkID, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
bool SendCall (const char *uniqueIdentifier, const char *stack, unsigned int bytesOnStack, char parameterCount)

Static Public Member Functions

static int RemoteRPCFunctionComp (const RPCIdentifier &key, const RemoteRPCFunction &data)

Protected Member Functions

void OnAttach (void)
virtual PluginReceiveResult OnReceive (Packet *packet)
virtual void OnAutoRPCCall (SystemAddress systemAddress, unsigned char *data, unsigned int lengthInBytes)
virtual void OnRPCRemoteIndex (SystemAddress systemAddress, unsigned char *data, unsigned int lengthInBytes)
virtual void OnRPCUnknownRemoteIndex (SystemAddress systemAddress, unsigned char *data, unsigned int lengthInBytes, RakNetTime timestamp)
virtual void OnClosedConnection (SystemAddress systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason)
virtual void OnRakPeerShutdown (void)
 Called when RakPeer is shutdown.
void Clear (void)
void SendError (SystemAddress target, unsigned char errorCode, const char *functionName)
unsigned GetLocalFunctionIndex (RPCIdentifier identifier)
bool GetRemoteFunctionIndex (SystemAddress systemAddress, RPCIdentifier identifier, unsigned int *outerIndex, unsigned int *innerIndex)

Protected Attributes

DataStructures::List
< LocalRPCFunction
localFunctions
DataStructures::Map
< SystemAddress,
DataStructures::OrderedList
< RPCIdentifier,
RemoteRPCFunction,
AutoRPC::RemoteRPCFunctionComp > * > 
remoteFunctions
RakNetTime outgoingTimestamp
PacketPriority outgoingPriority
PacketReliability outgoingReliability
char outgoingOrderingChannel
AddressOrGUID outgoingSystemIdentifier
bool outgoingBroadcast
NetworkID outgoingNetworkID
RakNet::BitStream outgoingExtraData
RakNetTime incomingTimeStamp
SystemAddress incomingSystemAddress
RakNet::BitStream incomingExtraData
NetworkIDManagernetworkIdManager
char currentExecution [512]

Detailed Description

Deprecated:
See RakNet::RPC3

The AutoRPC plugin allows you to call remote functions as if they were local functions, using the standard function call syntax No serialization or deserialization is needed. Advantages are that this is easier to use than regular RPC system. Disadvantages is that all parameters must be passable on the stack using memcpy (shallow copy). For other types of parameters, use SetOutgoingExtraData() and GetIncomingExtraData() Pointers are automatically dereferenced and the contents copied with memcpy Use the old system, or regular message passing, if you need greater flexibility

Definition at line 169 of file AutoRPC.h.


Constructor & Destructor Documentation

AutoRPC::AutoRPC (  ) 

Definition at line 31 of file AutoRPC.cpp.

AutoRPC::~AutoRPC (  )  [virtual]

Definition at line 44 of file AutoRPC.cpp.

Here is the call graph for this function:


Member Function Documentation

bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier  )  [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 258 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 284 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2,
P3  p3 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 297 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2,
P3  p3,
P4  p4 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 310 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 323 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 336 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6,
P7  p7 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 349 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6,
P7  p7,
P8  p8 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 362 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 >
bool RakNet::AutoRPC::Call ( const char *  uniqueIdentifier,
P1  p1 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 271 of file AutoRPC.h.

Here is the call graph for this function:

bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 381 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 405 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 429 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2,
P3  p3 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 453 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2,
P3  p3,
P4  p4 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 477 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6,
P7  p7,
P8  p8 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 573 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 501 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 525 of file AutoRPC.h.

Here is the call graph for this function:

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
bool RakNet::AutoRPC::CallExplicit ( const char *  uniqueIdentifier,
RakNetTime  timeStamp,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const AddressOrGUID  systemIdentifier,
bool  broadcast,
NetworkID  networkID,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6,
P7  p7 
) [inline]

Calls a remote function, using whatever was last passed to SetTimestamp(), SetSendParams(), SetRecipientAddress(), and SetRecipientObject() Passed parameter(s), if any, are passed via memcpy and pushed on the stack for the remote function

Note:
This ONLY works with variables that are passable via memcpy! If you need more flexibility, use SetOutgoingExtraData() and GetIncomingExtraData()
The this pointer, for this instance of AutoRPC, is pushed as the last parameter on the stack. See AutoRPCSample.ccp for an example of this
Parameters:
[in] uniqueIdentifier parameter of the same name passed to RegisterFunction() on the remote system
[in] timeStamp See SetTimestamp()
[in] priority See SetSendParams()
[in] reliability See SetSendParams()
[in] orderingChannel See SetSendParams()
[in] systemAddress See SetRecipientAddress()
[in] broadcast See SetRecipientAddress()
[in] networkID See SetRecipientObject()
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 549 of file AutoRPC.h.

Here is the call graph for this function:

void AutoRPC::Clear ( void   )  [protected]

Definition at line 653 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const char * AutoRPC::GetCurrentExecution ( void   )  const

Returns the currently running RPC call identifier, set from RegisterFunction::uniqueIdentifier Returns an empty string "" if none

Returns:
which RPC call is currently running

Definition at line 140 of file AutoRPC.cpp.

RakNet::BitStream * AutoRPC::GetIncomingExtraData ( void   ) 

Gets the bitstream written to via SetOutgoingExtraData(). Data is updated with each incoming function call

Returns:
A bitstream you can read from with extra data that was written with SetOutgoingExtraData();

Definition at line 144 of file AutoRPC.cpp.

SystemAddress AutoRPC::GetLastSenderAddress ( void   )  const

Returns the system address of the last system to send us a received function call Equivalent to the old system RPCParameters::sender

Returns:
Last system to send an RPC call using this system

Definition at line 132 of file AutoRPC.cpp.

RakNetTime AutoRPC::GetLastSenderTimestamp ( void   )  const

If the last received function call has a timestamp included, it is stored and can be retrieved with this function.

Returns:
0 if the last call did not have a timestamp, else non-zero

Definition at line 128 of file AutoRPC.cpp.

unsigned AutoRPC::GetLocalFunctionIndex ( AutoRPC::RPCIdentifier  identifier  )  [protected]

Definition at line 676 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

RakPeerInterface * AutoRPC::GetRakPeer ( void   )  const

Returns the instance of RakPeer this plugin was attached to.

Definition at line 136 of file AutoRPC.cpp.

bool AutoRPC::GetRemoteFunctionIndex ( SystemAddress  systemAddress,
AutoRPC::RPCIdentifier  identifier,
unsigned int *  outerIndex,
unsigned int *  innerIndex 
) [protected]

Definition at line 687 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void AutoRPC::OnAttach ( void   )  [protected, virtual]

Called when the interface is attached

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

Reimplemented from PluginInterface2.

Definition at line 251 of file AutoRPC.cpp.

Here is the call graph for this function:

void AutoRPC::OnAutoRPCCall ( SystemAddress  systemAddress,
unsigned char *  data,
unsigned int  lengthInBytes 
) [protected, virtual]

Definition at line 316 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void AutoRPC::OnClosedConnection ( SystemAddress  systemAddress,
RakNetGUID  rakNetGUID,
PI2_LostConnectionReason  lostConnectionReason 
) [protected, 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 from PluginInterface2.

Definition at line 298 of file AutoRPC.cpp.

Here is the call graph for this function:

void AutoRPC::OnRakPeerShutdown ( void   )  [protected, virtual]

Called when RakPeer is shutdown.

Reimplemented from PluginInterface2.

Definition at line 649 of file AutoRPC.cpp.

Here is the call graph for this function:

PluginReceiveResult AutoRPC::OnReceive ( Packet packet  )  [protected, virtual]

OnReceive is called for every packet.

Parameters:
[in] packet the 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 PluginInterface2.

Definition at line 258 of file AutoRPC.cpp.

Here is the call graph for this function:

void AutoRPC::OnRPCRemoteIndex ( SystemAddress  systemAddress,
unsigned char *  data,
unsigned int  lengthInBytes 
) [protected, virtual]

Definition at line 514 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void AutoRPC::OnRPCUnknownRemoteIndex ( SystemAddress  systemAddress,
unsigned char *  data,
unsigned int  lengthInBytes,
RakNetTime  timestamp 
) [protected, virtual]

Definition at line 560 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool AutoRPC::RegisterFunction ( const char *  uniqueIdentifier,
void *  functionPtr,
bool  isObjectMember,
char  parameterCount = -1 
)

Registers a function pointer to be callable given an identifier for the pointer

Parameters:
[in] uniqueIdentifier String identifying the function. Recommended that this is the name of the function
[in] functionPtr Pointer to the function. For C, just pass the name of the function. For C++, use ARPC_REGISTER_CPP_FUNCTION
[in] isObjectMember false if a C function. True if a member function of an object (C++)
[in] parameterCount Optional parameter to tell the system how many parameters this function has. If specified, and the wrong number of parameters are called by the remote system, the call is rejected. -1 indicates undefined
Returns:
True on success, false on uniqueIdentifier already used.

Definition at line 52 of file AutoRPC.cpp.

Here is the call graph for this function:

int AutoRPC::RemoteRPCFunctionComp ( const RPCIdentifier key,
const RemoteRPCFunction data 
) [static]

Definition at line 22 of file AutoRPC.cpp.

bool AutoRPC::SendCall ( const char *  uniqueIdentifier,
const char *  stack,
unsigned int  bytesOnStack,
char  parameterCount 
)

Definition at line 148 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void AutoRPC::SendError ( SystemAddress  target,
unsigned char  errorCode,
const char *  functionName 
) [protected]

Definition at line 641 of file AutoRPC.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void AutoRPC::SetNetworkIDManager ( NetworkIDManager idMan  ) 

Sets the network ID manager to use for object lookup Required to call C++ object member functions via SetRecipientObject()

Parameters:
[in] idMan Pointer to the network ID manager to use

Definition at line 48 of file AutoRPC.cpp.

RakNet::BitStream * AutoRPC::SetOutgoingExtraData ( void   ) 

Write extra data to pass for all following calls to Call() Use BitStream::Reset to clear extra data. Don't forget to do this or you will waste bandwidth.

Returns:
A bitstream you can write to to send extra data with each following call to Call()

Definition at line 124 of file AutoRPC.cpp.

void AutoRPC::SetRecipientAddress ( AddressOrGUID  systemIdentifier,
bool  broadcast 
)

Set system to send to for all following calls to Call() Defaults to UNASSIGNED_SYSTEM_ADDRESS, broadcast=true

Parameters:
[in] systemIdentifier See RakPeer::Send()
[in] broadcast See RakPeer::Send()

Definition at line 115 of file AutoRPC.cpp.

Here is the caller graph for this function:

void AutoRPC::SetRecipientObject ( NetworkID  networkID  ) 

Set the NetworkID to pass for all following calls to Call() Defaults to UNASSIGNED_NETWORK_ID (none) If set, the remote function will be considered a C++ function, e.g. an object member function If set to UNASSIGNED_NETWORK_ID (none), the remote function will be considered a C function If this is set incorrectly, you will get back either RPC_ERROR_CALLING_C_AS_CPP or RPC_ERROR_CALLING_CPP_AS_C

See also:
NetworkIDManager
Parameters:
[in] networkID Returned from NetworkIDObject::GetNetworkID()

Definition at line 120 of file AutoRPC.cpp.

Here is the caller graph for this function:

void AutoRPC::SetSendParams ( PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel 
)

Set parameters to pass to RakPeer::Send() for all following calls to Call() Deafults to HIGH_PRIORITY, RELIABLE_ORDERED, ordering channel 0

Parameters:
[in] priority See RakPeer::Send()
[in] reliability See RakPeer::Send()
[in] orderingChannel See RakPeer::Send()

Definition at line 109 of file AutoRPC.cpp.

Here is the caller graph for this function:

void AutoRPC::SetTimestamp ( RakNetTime  timeStamp  ) 

Send or stop sending a timestamp with all following calls to Call() Use GetLastSenderTimestamp() to read the timestamp.

Parameters:
[in] timeStamp Non-zero to pass this timestamp using the ID_TIMESTAMP system. 0 to clear passing a timestamp.

Definition at line 105 of file AutoRPC.cpp.

Here is the caller graph for this function:

bool AutoRPC::UnregisterFunction ( const char *  uniqueIdentifier,
bool  isObjectMember 
)

Unregisters a function pointer to be callable given an identifier for the pointer

Note:
This is not safe to call while connected
Parameters:
[in] uniqueIdentifier String identifying the function.
[in] isObjectMember false if a C function. True if a member function of an object (C++)
Returns:
True on success, false on function was not previously or is not currently registered.

Definition at line 86 of file AutoRPC.cpp.

Here is the call graph for this function:


Member Data Documentation

char RakNet::AutoRPC::currentExecution[512] [protected]

Definition at line 657 of file AutoRPC.h.

Definition at line 654 of file AutoRPC.h.

Definition at line 653 of file AutoRPC.h.

Definition at line 652 of file AutoRPC.h.

Definition at line 640 of file AutoRPC.h.

Definition at line 656 of file AutoRPC.h.

Definition at line 648 of file AutoRPC.h.

Definition at line 650 of file AutoRPC.h.

Definition at line 649 of file AutoRPC.h.

Definition at line 646 of file AutoRPC.h.

Definition at line 644 of file AutoRPC.h.

Definition at line 645 of file AutoRPC.h.

Definition at line 647 of file AutoRPC.h.

Definition at line 643 of file AutoRPC.h.

Definition at line 641 of file AutoRPC.h.


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