Navigation
API > API/Plugins > API/Plugins/OnlineServicesEOSGS > API/Plugins/OnlineServicesEOSGS/Online > API/Plugins/OnlineServicesEOSGS/Online/UE__Online__EOS_Async
References
| Module | OnlineServicesEOSGS |
| Header | /Engine/Plugins/Online/OnlineServicesEOSGS/Source/Public/Online/OnlineServicesEOSGSTypes.h |
| Include | #include "Online/OnlineServicesEOSGSTypes.h" |
namespace UE
{
namespace Online
{
template<typename TEOSResult, typename TEOSHandle, typename TEOSParameters, typename TEOSFn>
decltype(auto) UE&58;&58;Online&58;&58;EOS_Async
&40;
TEOSFn EOSFn,
TEOSHandle EOSHandle,
TEOSParameters Parameters,
TPromise< const TEOSResult &42; > && Promise
&41;
}
}
Remarks
This method requires a Promise that will be fulfilled by the EOS callback. This is primarily intended to be used with continuations that take a TPromise. e.g.: InAsyncOp.Then(this, LoginOptions, Credentials mutable { LoginOptions.Credentials = &Credentials; EOS_Async(EOS_Auth_Login, AuthHandle, LoginOptions, MoveTemp(Promise)); })
Note that when a continuation takes a Promise parameter, the Future for that Promise is already bound to the next continuation in the Op chain. Therefore, as soon as the EOS_Auth_Login callback is called, the promise will be fulfilled, and the next continuation will run immediately. This ensures that even if the SDK calls the callback immediately (i.e. before EOS_Async returns), the continuation is already bound, and we can safely consume the CallbackInfo. Note that the CallbackInfo is only valid for the duration of the callback, so it is not safe to bind a continuation after calling the EOS method.Warning: This signature will crash if the async method returns immediately. The callback object is deleted inside the callback before EOS_Async returns the future back to the user.