Cogito, ergo sum

UE3:OnlineGameInterfaceImpl (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> OnlineGameInterfaceImpl
Package: 
IpDrv
Within class: 
OnlineSubsystemCommonImpl
Implemented interfaces
OnlineGameInterface
This class in other games:
UT3

Class that implements a cross platform version of the game interface

Properties[edit]

CancelFindOnlineGamesCompleteDelegates[edit]

Type: array<delegate<OnCancelFindOnlineGamesComplete> >

Array of delegates to multicast with for game search notification

CreateOnlineGameCompleteDelegates[edit]

Type: array<delegate<OnCreateOnlineGameComplete> >

Array of delegates to multicast with for game creation notification

CurrentGameState[edit]

Type: OnlineSubsystem.EOnlineGameState

Modifiers: const

The current game state as the Live layer understands it

DestroyOnlineGameCompleteDelegates[edit]

Type: array<delegate<OnDestroyOnlineGameComplete> >

Array of delegates to multicast with for game destruction notification

EndOnlineGameCompleteDelegates[edit]

Type: array<delegate<OnEndOnlineGameComplete> >

Array of delegates to multicast with for game ending notification

FindOnlineGamesCompleteDelegates[edit]

Type: array<delegate<OnFindOnlineGamesComplete> >

Array of delegates to multicast with for game search notification

GameSearch[edit]

Type: OnlineGameSearch

Modifiers: const

The current game search object in use

GameSettings[edit]

Type: OnlineGameSettings

Modifiers: const

The current game settings object in use

JoinOnlineGameCompleteDelegates[edit]

Type: array<delegate<OnJoinOnlineGameComplete> >

Array of delegates to multicast with for game join notification

LanAnnouncePort[edit]

Type: int

Modifiers: const, config

Port to listen on for LAN queries/responses

Default value: 14001

LanBeacon[edit]

Type: pointer{FLanBeacon}

Modifiers: const, native, transient

LAN announcement socket used to send/receive discovery packets

LanBeaconState[edit]

Type: OnlineSubsystem.ELanBeaconState

Modifiers: const

The current state the lan beacon is in

LanGameUniqueId[edit]

Type: int

Modifiers: const, config

Unique id to keep UE3 games from seeing each others' lan packets

Default value: 1297549275

LanNonce[edit]

Type: byte

Array size: 8

Modifiers: const

Used by a client to uniquely identify itself during lan match discovery

LanPacketPlatformMask[edit]

Type: int

Modifiers: const, config

Mask containing which platforms can cross communicate

Default value: 1

LanQueryTimeLeft[edit]

Type: float

The amount of time before the lan query is considered done

LanQueryTimeout[edit]

Type: float

Modifiers: config

The amount of time to wait before timing out a lan query request

Default value: 5.0

OwningSubsystem[edit]

Type: OnlineSubsystemCommonImpl

The owning subsystem that this object is providing an implementation for

SessionInfo[edit]

Type: pointer{FSessionInfo}

Modifiers: native, const, transient, private

The session information used to connect to a host

StartOnlineGameCompleteDelegates[edit]

Type: array<delegate<OnStartOnlineGameComplete> >

Array of delegates to multicast with for game starting notification

UpdateOnlineGameCompleteDelegates[edit]

Type: array<delegate<OnUpdateOnlineGameComplete> >

Array of delegates to multicast with for game update notification

Delegates[edit]

OnArbitrationRegistrationComplete[edit]

delegate OnArbitrationRegistrationComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnArbitrationRegistrationComplete

Delegate fired when the online game has completed registration for arbitration

Parameters:

  • SessionName - the name of the session the that had arbitration pending
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnCancelFindOnlineGamesComplete[edit]

delegate OnCancelFindOnlineGamesComplete (bool bWasSuccessful)

Specified by: OnlineGameInterface.OnCancelFindOnlineGamesComplete

Delegate fired when the cancellation of a search for an online game has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnCreateOnlineGameComplete[edit]

delegate OnCreateOnlineGameComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnCreateOnlineGameComplete

Delegate fired when a create request has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnDestroyOnlineGameComplete[edit]

delegate OnDestroyOnlineGameComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnDestroyOnlineGameComplete

Delegate fired when a destroying an online game has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnEndOnlineGameComplete[edit]

delegate OnEndOnlineGameComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnEndOnlineGameComplete

Delegate fired when the online game has transitioned to the ending game state

Parameters:

  • SessionName - the name of the session the that was ended
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnFindOnlineGamesComplete[edit]

delegate OnFindOnlineGamesComplete (bool bWasSuccessful)

Specified by: OnlineGameInterface.OnFindOnlineGamesComplete

Delegate fired when the search for an online game has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnGameInviteAccepted[edit]

delegate OnGameInviteAccepted (const out OnlineGameSearch.OnlineGameSearchResult InviteResult)

Specified by: OnlineGameInterface.OnGameInviteAccepted

Called when a user accepts a game invitation. Allows the gameplay code a chance to clean up any existing state before accepting the invite. The invite must be accepted by calling AcceptGameInvite() on the OnlineGameInterface after clean up has completed

Parameters:

  • InviteResult - the search/settings for the game we're joining via invite

OnJoinOnlineGameComplete[edit]

delegate OnJoinOnlineGameComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnJoinOnlineGameComplete

Delegate fired when the joing process for an online game has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnRegisterPlayerComplete[edit]

delegate OnRegisterPlayerComplete (name SessionName, OnlineSubsystem.UniqueNetId PlayerId, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnRegisterPlayerComplete

Delegate fired when the registration process has completed

Parameters:

  • SessionName - the name of the session the player joined or not
  • PlayerId - the player that was unregistered from the online service
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnStartOnlineGameComplete[edit]

delegate OnStartOnlineGameComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnStartOnlineGameComplete

Delegate fired when the online game has transitioned to the started state

Parameters:

  • SessionName - the name of the session the that has transitioned to started
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnUnregisterPlayerComplete[edit]

delegate OnUnregisterPlayerComplete (name SessionName, OnlineSubsystem.UniqueNetId PlayerId, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnUnregisterPlayerComplete

Delegate fired when the unregistration process has completed

Parameters:

  • SessionName - the name of the session the player left
  • PlayerId - the player that was unregistered from the online service
  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnUpdateOnlineGameComplete[edit]

delegate OnUpdateOnlineGameComplete (name SessionName, bool bWasSuccessful)

Specified by: OnlineGameInterface.OnUpdateOnlineGameComplete

Delegate fired when a update request has completed

Parameters:

  • SessionName - the name of the session this callback is for
  • bWasSuccessful - true if the async action completed without error, false if there was an error

Functions[edit]

Native functions[edit]

BindPlatformSpecificSessionToSearch[edit]

native function bool BindPlatformSpecificSessionToSearch (byte SearchingPlayerNum, OnlineGameSearch SearchSettings, byte PlatformSpecificInfo[68])

Specified by: OnlineGameInterface.BindPlatformSpecificSessionToSearch

Creates a search result out of the platform specific data and adds that to the specified search object

Parameters:

  • SearchingPlayerNum - the index of the player searching for a match
  • SearchSettings - the desired search to bind the session to
  • PlatformSpecificInfo - the platform specific information to convert to a server object

Returns:

true if successful searching for sessions, false otherwise

CancelFindOnlineGames[edit]

native function bool CancelFindOnlineGames ()

Specified by: OnlineGameInterface.CancelFindOnlineGames

Cancels the current search in progress if possible for that search type

Returns:

true if successful searching for sessions, false otherwise

CreateOnlineGame[edit]

native function bool CreateOnlineGame (byte HostingPlayerNum, name SessionName, OnlineGameSettings NewGameSettings)

Specified by: OnlineGameInterface.CreateOnlineGame

Creates an online game based upon the settings object specified. NOTE: online game registration is an async process and does not complete until the OnCreateOnlineGameComplete delegate is called.

Parameters:

  • HostingPlayerNum - the index of the player hosting the match
  • SessionName - the name to use for this session so that multiple sessions can exist at the same time
  • NewGameSettings - the settings to use for the new game session

Returns:

true if successful creating the session, false otherwise

DestroyOnlineGame[edit]

native function bool DestroyOnlineGame (name SessionName)

Specified by: OnlineGameInterface.DestroyOnlineGame

Destroys the current online game NOTE: online game de-registration is an async process and does not complete until the OnDestroyOnlineGameComplete delegate is called.

Parameters:

  • SessionName - the name of the session to delete

Returns:

true if successful destroying the session, false otherwsie

EndOnlineGame[edit]

native function bool EndOnlineGame (name SessionName)

Specified by: OnlineGameInterface.EndOnlineGame

Marks an online game as having been ended

Parameters:

  • SessionName - the name of the session the to end

Returns:

true if the call succeeds, false otherwise

FindOnlineGames[edit]

native function bool FindOnlineGames (byte SearchingPlayerNum, OnlineGameSearch SearchSettings)

Specified by: OnlineGameInterface.FindOnlineGames

Searches for games matching the settings specified

Parameters:

  • SearchingPlayerNum - the index of the player searching for a match
  • SearchSettings - the desired settings that the returned sessions will have

Returns:

true if successful searching for sessions, false otherwise

FreeSearchResults[edit]

native function bool FreeSearchResults (OnlineGameSearch Search)

Specified by: OnlineGameInterface.FreeSearchResults

Cleans up any platform specific allocated data contained in the search results

Parameters:

  • Search - the object to free search results for

Returns:

true if successful, false otherwise

GetResolvedConnectString[edit]

native function bool GetResolvedConnectString (name SessionName, out string ConnectInfo)

Specified by: OnlineGameInterface.GetResolvedConnectString

Returns the platform specific connection information for joining the match. Call this function from the delegate of join completion

Parameters:

  • SessionName - the name of the session to fetch the connection information for
  • ConnectInfo - the out var containing the platform specific connection information

Returns:

true if the call was successful, false otherwise

JoinOnlineGame[edit]

native function bool JoinOnlineGame (byte PlayerNum, name SessionName, const out OnlineGameSearch.OnlineGameSearchResult DesiredGame)

Specified by: OnlineGameInterface.JoinOnlineGame

Joins the game specified

Parameters:

  • PlayerNum - the index of the player searching for a match
  • SessionName - the name of the session to join
  • DesiredGame - the desired game to join

Returns:

true if the call completed successfully, false otherwise

ReadPlatformSpecificSessionInfo[edit]

native function bool ReadPlatformSpecificSessionInfo (const out OnlineGameSearch.OnlineGameSearchResult DesiredGame, out byte PlatformSpecificInfo[68])

Specified by: OnlineGameInterface.ReadPlatformSpecificSessionInfo

Serializes the platform specific data into the provided buffer for the specified search result

Parameters:

  • DesiredGame - the game to copy the platform specific data for
  • PlatformSpecificInfo - the buffer to fill with the platform specific information

Returns:

true if successful serializing the data, false otherwise

StartOnlineGame[edit]

native function bool StartOnlineGame (name SessionName)

Specified by: OnlineGameInterface.StartOnlineGame

Marks an online game as in progress (as opposed to being in lobby or pending)

Parameters:

  • SessionName - the name of the session that is being started

Returns:

true if the call succeeds, false otherwise

Other instance functions[edit]

See OnlineGameInterfaceImpl instance functions.