|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Calls a server side Extension, letting it run beside the other requests instead of in turn with them. More...
#include <ExtensionAsyncRequest.h>
Public Member Functions | |
| ExtensionAsyncRequest (std::string cmdName, entities::SFSObject ¶ms, entities::Room *room=nullptr, net::TransportType txType=net::TransportType::TCP) | |
| Public Member Functions inherited from sfs3::requests::ExtensionRequest | |
| ExtensionRequest (std::string cmdName, entities::SFSObject ¶ms, entities::Room *room=nullptr, net::TransportType txType=net::TransportType::TCP) | |
| Creates a new ExtensionRequest. | |
Calls a server side Extension, letting it run beside the other requests instead of in turn with them.
Requests are normally processed one after the other, in the order the server receives them. This is a problem when a slow request sits among fast ones: a call that reads a database, for example, holds back the quick position updates of a realtime game queued behind it.
An Extension called this way runs on a thread of its own, so the requests that follow it are not held back. Because of this, the order in which the responses come back is no longer guaranteed.
|
inline |
| cmdName | the name of the command to call on the server side Extension |
| params | the parameters of the call; copied into the request, with any nested object or array shared rather than cloned |
| room | the Room whose Extension is called; if nullptr, the Zone's Extension is called instead |
| txType | the transport carrying the request |