#include <CloudServer.h>
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. |
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.
[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.
[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.
[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()
[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
[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.
[in] | packet | the packet that is being returned to the user |
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.
[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().
[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.
[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).
[in] | bytes | Max bytes a client can upload. 0 means unlimited. |