RakNet::AutopatcherServer Class Reference
The server plugin for the autopatcher. Must be running for the client to get patches.
More...
#include <AutopatcherServer.h>
List of all members.
Detailed Description
The server plugin for the autopatcher. Must be running for the client to get patches.
Member Function Documentation
void RakNet::AutopatcherServer::CacheMostRecentPatch |
( |
const char * |
applicationName |
) |
|
Load the most recent patch in memory and keep it there This can take a lot of memory, but greatly speeds up serving patches, since disk access is not incurred
- Parameters:
-
[in] | applicationName | 0 means all, otherwise the name of the application to cache |
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.
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::AutopatcherServer::SetFileListTransferPlugin |
( |
FileListTransfer * |
flt |
) |
|
This plugin has a dependency on the FileListTransfer plugin, which it uses to actually send the files. So you need an instance of that plugin registered with RakPeerInterface, and a pointer to that interface should be passed here.
- Parameters:
-
void RakNet::AutopatcherServer::SetLoadManagementCallback |
( |
AutopatcherServerLoadNotifier * |
asumc |
) |
|
Set a callback to get notifications of when user requests are queued and processed This is primarily of use to load balance the server
- Parameters:
-
[in] | asumc | An externally allocated instance of AutopatcherServerLoadNotifier. Pass 0 to disable. |
void RakNet::AutopatcherServer::SetMaxConurrentUsers |
( |
unsigned int |
_maxConcurrentUsers |
) |
|
This is the maximum number of users the patcher will service at one time (generally about equal to the number of downloads at once) If this limit is exceeded, the request packet will be put into a queue and serviced when slots are available Defaults to 0 (unlimited)
- Parameters:
-
[in] | maxConcurrentUsers | Pass 0 for unlimited, otherwise the max users to serve at once |
void RakNet::AutopatcherServer::SetUploadSendParameters |
( |
PacketPriority |
_priority, |
|
|
char |
_orderingChannel | |
|
) |
| | |
DO THIS FIRST Implement to start the worker threads. Before this is called, no queries will be performed When this is called, AllocAutopatcherRepositoryInterface will be called with repositoryAllocationParameters The system works in three phases. 1. Get change list since a given date. This uses one of the worker threads. 2. If either running a full scan, or files have changed since a given date, get the list of patches. This uses one of the worker threads and does an intensive comparison of the hashes the client has vs. the files in the database 3. If the total amount of data to be sent exceeds DATABASE_READ_CHUNK_SIZE, defined in the cpp file, then the database will be read from incrementally during this download phase. This uses an sql connection object, which may or may not be also in use by one of the threads. If you have more sql connections than threads, this tends to prevent the same connection from being used to incrementally read files for a downloader, and to be used in a worker thread.
- Parameters:
-
[in] | numThreads | Number of processing threads, which handles the CPU intensive tasks of generating a patch list and comparing files |
[in] | numSQLConnections | Number of SQL connection objects passed to sqlConnectionPtrArray. Must be greater than or equal to numThreads |
[in] | sqlConnectionPtrArray | List of pointers to AutopatcherRepositoryInterface. C++ note: Don't just cast a derived class array, you need to take the pointer address of each item |
The documentation for this class was generated from the following file: