RakNet::CloudServer Class Reference
[CloudComputing]

Stores client data, and allows cross-server communication to retrieve this data. More...

#include <CloudServer.h>

Inheritance diagram for RakNet::CloudServer:

RakNet::PluginInterface2 RakNet::CloudAllocator

List of all members.

Public Member Functions

void SetMaxUploadBytesPerClient (uint64_t bytes)
 Max bytes a client can upload Data in excess of this value is silently ignored defaults to 0 (unlimited).
void SetMaxBytesPerDownload (uint64_t bytes)
 Max bytes returned by a download. If the number of bytes would exceed this amount, the returned list is truncated However, if this would result in no rows downloaded, then one row will be returned.
void AddServer (RakNetGUID systemIdentifier)
 Add a server, which is assumed to be connected in a fully connected mesh to all other servers and also running the CloudServer plugin The other system must also call AddServer before getting the subscription data, or it will be rejected. Sending a message telling the other system to call AddServer(), followed by calling AddServer() locally, would be sufficient for this to work.
void RemoveServer (RakNetGUID systemIdentifier)
 Removes a server added through AddServer().
void GetRemoteServers (DataStructures::List< RakNetGUID > &remoteServersOut)
void Clear (void)
 Frees all memory. Does not remove query filters.
void ForceExternalSystemAddress (SystemAddress forcedAddress)
 Report the specified SystemAddress to client queries, rather than what RakPeer reads. This is useful if you already know your public IP This only applies to future updates, so call it before updating to apply to all queries.
void AddQueryFilter (CloudServerQueryFilter *filter)
 Adds a callback called on each query. If all filters returns true for an operation, the operation is allowed. If the filter was already added, the function silently fails.
void RemoveQueryFilter (CloudServerQueryFilter *filter)
 Removes a callback added with AddQueryFilter() The instance is not deleted, only unreferenced. It is up to the user to delete the instance, if necessary.
void RemoveAllQueryFilters (void)
 Removes all instances of CloudServerQueryFilter added with AddQueryFilter(). The instances are not deleted, only unreferenced. It is up to the user to delete the instances, if necessary.

Protected Member Functions

virtual void Update (void)
 Update is called every time a packet is checked for .
virtual PluginReceiveResult OnReceive (Packet *packet)
virtual void OnClosedConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason)
virtual void OnRakPeerShutdown (void)
 Called when RakPeer is shutdown.


Detailed Description

Stores client data, and allows cross-server communication to retrieve this data.

Member Function Documentation

void RakNet::CloudServer::AddQueryFilter ( CloudServerQueryFilter filter  ) 

Adds a callback called on each query. If all filters returns true for an operation, the operation is allowed. If the filter was already added, the function silently fails.

Parameters:
[in] filter An externally allocated instance of CloudServerQueryFilter. The instance must remain valid until it is removed with RemoveQueryFilter() or RemoveAllQueryFilters()

void RakNet::CloudServer::AddServer ( RakNetGUID  systemIdentifier  ) 

Add a server, which is assumed to be connected in a fully connected mesh to all other servers and also running the CloudServer plugin The other system must also call AddServer before getting the subscription data, or it will be rejected. Sending a message telling the other system to call AddServer(), followed by calling AddServer() locally, would be sufficient for this to work.

Note:
This sends subscription data to the other system, using RELIABLE_ORDERED on channel 0
Parameters:
[in] systemIdentifier Identifier of the remote system

void RakNet::CloudServer::ForceExternalSystemAddress ( SystemAddress  forcedAddress  ) 

Report the specified SystemAddress to client queries, rather than what RakPeer reads. This is useful if you already know your public IP This only applies to future updates, so call it before updating to apply to all queries.

Parameters:
[in] forcedAddress The systmeAddress to return in queries. Use UNASSIGNED_SYSTEM_ADDRESS (default) to use what RakPeer returns

void RakNet::CloudServer::GetRemoteServers ( DataStructures::List< RakNetGUID > &  remoteServersOut  ) 

Return list of servers added with AddServer()

Parameters:
[out] remoteServers List of servers added

virtual void RakNet::CloudServer::OnClosedConnection ( const 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 RakNet::PluginInterface2.

virtual PluginReceiveResult RakNet::CloudServer::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 RakNet::PluginInterface2.

void RakNet::CloudServer::RemoveQueryFilter ( CloudServerQueryFilter filter  ) 

Removes a callback added with AddQueryFilter() The instance is not deleted, only unreferenced. It is up to the user to delete the instance, if necessary.

Parameters:
[in] filter An externally allocated instance of CloudServerQueryFilter. The instance must remain valid until it is removed with RemoveQueryFilter() or RemoveAllQueryFilters()

void RakNet::CloudServer::RemoveServer ( RakNetGUID  systemIdentifier  ) 

Removes a server added through AddServer().

Parameters:
[in] systemIdentifier Identifier of the remote system

void RakNet::CloudServer::SetMaxBytesPerDownload ( uint64_t  bytes  ) 

Max bytes returned by a download. If the number of bytes would exceed this amount, the returned list is truncated However, if this would result in no rows downloaded, then one row will be returned.

Parameters:
[in] bytes Max bytes a client can download from a single Get(). 0 means unlimited.

void RakNet::CloudServer::SetMaxUploadBytesPerClient ( uint64_t  bytes  ) 

Max bytes a client can upload Data in excess of this value is silently ignored defaults to 0 (unlimited).

Parameters:
[in] bytes Max bytes a client can upload. 0 means unlimited.


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

Generated on Wed Feb 1 13:33:47 2012 for RakNet by  doxygen 1.5.7.1