PFMultiplayerCreateServerBackfillTicket

Creates a server backfill ticket.

Syntax

HRESULT PFMultiplayerCreateServerBackfillTicket(  
    PFMultiplayerHandle handle,  
    const PFEntityKey* server,  
    const PFMatchmakingServerBackfillTicketConfiguration* configuration,  
    void* asyncContext,  
    PFMatchmakingTicketHandle* ticket  
)  

Parameters

handle   PFMultiplayerHandle

The handle of the PFMultiplayer API instance.

server   PFEntityKey*

The server entity.

configuration   PFMatchmakingServerBackfillTicketConfiguration*

The backfill ticket configuration.

asyncContext   void*
optional

An optional, app-defined, pointer-sized context value that can be used to associate the completion state change with this call.

ticket   PFMatchmakingTicketHandle*
library-allocated output

The resulting ticket object.

Return value

Type: HRESULT

S_OK if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via PFMultiplayerGetErrorMessage().

Remarks

To use this feature, you must define PFMULTIPLAYER_INCLUDE_SERVER_APIS before including PFMatchmaking.h.

The library automatically, and asynchronously, will submit a server backfill ticket to the matchmaking service. Each time the ticket status changes, a PFMatchmakingTicketStatusChangedStateChange will be provided. The ticket status can be queried at any time via PFMatchmakingTicketGetStatus(). The ticket immediately starts in the PFMatchmakingTicketStatus::Creating state.

When the ticket has completed, a PFMatchmakingTicketStatusChangedStateChange will be provided. At that point, a match for the backfill ticket will have been found or the ticket stopped due to failure. On success, the match that was found can be queried via PFMatchmakingTicketGetMatch(). The regionPreferences in PFMatchmakingMatchDetails will only contain the region that the server is located in.

This function requires that a previous call to PFMultiplayerSetEntityToken() was made to set the game server entity token.

Requirements

Header: PFMatchmaking.h

See also

PFMatchmaking members