Cogito, ergo sum

UE3:PartyBeaconClient (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> PartyBeacon >> PartyBeaconClient
Package: 
IpDrv

This class is used to connect to a network beacon in order to request a reservation for their party with that host

Properties[edit]

ClientBeaconRequestType[edit]

Type: EPartyBeaconClientRequest

The pending request to be sent

ClientBeaconState[edit]

Type: EPartyBeaconClientState

The state of the client beacon

HostPendingRequest[edit]

Type: OnlineGameSearch.OnlineGameSearchResult

Modifiers: const

Holds a reference to the data that is used to reach the potential host

PendingRequest[edit]

Type: PartyBeacon.PartyReservation

The request to send once the socket is established

ReservationRequestElapsedTime[edit]

Type: float

Used to track how long we've been waiting for a response

ReservationRequestTimeout[edit]

Type: float

Modifiers: config

Indicates how long the client should wait for a response before timing out and trying a new server

Resolver[edit]

Type: ClientBeaconAddressResolver

Platform specific address resolver for this beacon. Instantiated using the ResolverClass type.

ResolverClass[edit]

Type: class<ClientBeaconAddressResolver>

Class to use for address resolving and registering

ResolverClassName[edit]

Type: string

Modifiers: config

Name of the class to use for address resolving and registering

Enums[edit]

EPartyBeaconClientRequest[edit]

Determine the pending request to be sent to the host

PBClientRequest_NewReservation 
PBClientRequest_UpdateReservation 

EPartyBeaconClientState[edit]

Used to drive the client state machine

PBCS_None 
PBCS_Connecting 
PBCS_Connected 
PBCS_ConnectionFailed 
PBCS_AwaitingResponse 
PBCS_Closed 

Delegates[edit]

OnHostHasCancelled[edit]

delegate OnHostHasCancelled ()

Called by the beacon when the host sends the "cancellation" packet, so the client can return to finding a new host

OnHostIsReady[edit]

delegate OnHostIsReady ()

Called by the beacon when the host sends the "ready" packet, so the client can connect to the host to start the match

OnReservationCountUpdated[edit]

delegate OnReservationCountUpdated (int ReservationRemaining)

Called by the beacon when the host sends a reservation count update packet so that any UI can be updated

Parameters:

  • ReservationRemaining - the number of reservations that are still available

OnReservationRequestComplete[edit]

delegate OnReservationRequestComplete (PartyBeacon.EPartyReservationResult ReservationResult)

Called by the beacon when a reservation request has been responded to by the destination host

Parameters:

  • ReservationResult - whether there was space allocated for the party or not

OnReservationUpdateRequestComplete[edit]

delegate OnReservationUpdateRequestComplete (PartyBeacon.EPartyReservationResult ReservationResult)

Called by the beacon when a reservation update request has been responded to by the destination host

Parameters:

  • ReservationResult - whether there was space allocated for the party or not

OnTravelRequestReceived[edit]

delegate OnTravelRequestReceived (name SessionName, class<OnlineGameSearchSearchClass, byte PlatformSpecificInfo[68])

Called by the beacon when the host sends a request for all clients to travel to the destination included in the packet

Parameters:

  • SessionName - the name of the session to register
  • SearchClass - the search that should be populated with the session
  • PlatformSpecificInfo - the binary data to place in the platform specific areas

Native functions[edit]

DestroyBeacon[edit]

native event DestroyBeacon ()

Overrides: PartyBeacon.DestroyBeacon

Stops listening for requests/responses and releases any allocated memory

CancelReservation[edit]

native function bool CancelReservation (OnlineSubsystem.UniqueNetId CancellingPartyLeader)

Sends a cancellation message to the remote host so that it knows there is more space available

Parameters:

  • CancellingPartyLeader - the leader of this party that wants to cancel

Returns:

true if the request able to be sent, false if it failed to send

RequestReservation[edit]

native function bool RequestReservation (const out OnlineGameSearch.OnlineGameSearchResult DesiredHost, OnlineSubsystem.UniqueNetId RequestingPartyLeader, const out array<PartyBeacon.PlayerReservationPlayers)

Sends a request to the remote host to allow the specified members to reserve space in the host's session. Note this request is async and the results will be sent via the delegate

Parameters:

  • DesiredHost - the server that the connection will be made to
  • RequestingPartyLeader - the leader of this party that will be joining
  • Players - the list of players that want to reserve space

Returns:

true if the request able to be sent, false if it failed to send

RequestReservationUpdate[edit]

native function bool RequestReservationUpdate (const out OnlineGameSearch.OnlineGameSearchResult DesiredHost, OnlineSubsystem.UniqueNetId RequestingPartyLeader, const out array<PartyBeacon.PlayerReservationPlayersToAdd)

Sends a request to the remote host to update an existing reservation for the specified party leader. Any new players not already in the party leader's reservation will be added to that reservation on the host. Host sends a EPartyReservationResult back.

Parameters:

  • DesiredHost - the server that the connection will be made to
  • RequestingPartyLeader - party leader that will be updating his existing reservation
  • PlayersToAdd - the list of players that want to reserve space in an existing reservation

Returns:

true if the request able to be sent, false if it failed to send