SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::ExtensionAsyncRequest Class Reference

Calls a server side Extension, letting it run beside the other requests instead of in turn with them. More...

#include <ExtensionAsyncRequest.h>

Inheritance diagram for sfs3::requests::ExtensionAsyncRequest:
[legend]

Public Member Functions

 ExtensionAsyncRequest (std::string cmdName, entities::SFSObject &params, entities::Room *room=nullptr, net::TransportType txType=net::TransportType::TCP)
Public Member Functions inherited from sfs3::requests::ExtensionRequest
 ExtensionRequest (std::string cmdName, entities::SFSObject &params, entities::Room *room=nullptr, net::TransportType txType=net::TransportType::TCP)
 Creates a new ExtensionRequest.

Detailed Description

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.

See also
ExtensionRequest

Constructor & Destructor Documentation

◆ ExtensionAsyncRequest()

sfs3::requests::ExtensionAsyncRequest::ExtensionAsyncRequest ( std::string cmdName,
entities::SFSObject & params,
entities::Room * room = nullptr,
net::TransportType txType = net::TransportType::TCP )
inline
Parameters
cmdNamethe name of the command to call on the server side Extension
paramsthe parameters of the call; copied into the request, with any nested object or array shared rather than cloned
roomthe Room whose Extension is called; if nullptr, the Zone's Extension is called instead
txTypethe transport carrying the request

The documentation for this class was generated from the following files:
  • requests/ExtensionAsyncRequest.h
  • requests/ExtensionAsyncRequest.cpp