Quantum 3 3.1.0

Public Member Functions | Public Attributes | Properties | List of all members
Photon.Realtime.MatchmakingArguments Struct Reference

The arguments list for the matchmaking extension method ConnectToRoomAsync(). More...

Public Member Functions

override string ToString ()
 Print some fields verbose. More...
 
void Validate ()
 Run validation and throw on missing fields. More...
 

Public Attributes

AsyncConfig AsyncConfig
 Async configuration that include TaskFactory and global cancellation support. If null then AsyncConfig.Global is used. More...
 
AuthenticationValues AuthValues
 Provide authentication values for the Photon server connection. Use this in conjunction with custom authentication. This field is created when UserId is set. More...
 
bool CanOnlyJoin
 Configure if the connect request can also create rooms or if it only tries to join. More...
 
bool CanRejoin => PlayerTtlInSeconds > 0
 Returns if a client can rejoin a room which is only valid when PlayerTtlInSeconds is greater the 0. More...
 
string[] CustomLobbyProperties
 Optional list of room properties that are used for lobby matchmaking. Will be configured as EnterRoomArgs.RoomOptions.CustomRoomPropertiesForLobby — the subset of CustomProperties that the Master Server sends to lobby clients. More...
 
PhotonHashtable CustomProperties
 Custom room properties. Set on EnterRoomArgs.RoomOptions and JoinRandomRoomArgs.ExpectedCustomRoomProperties More...
 
RoomOptions CustomRoomOptions
 Optionally set explicit room options to use for EnterRoomArgs.RoomOptions. No properties will be set internally when this is set (see BuildEnterRoomArgs). More...
 
int EmptyRoomTtlInSeconds
 Empty room TTL setting in seconds. Only meaningful together with PlayerTtlInSeconds > 0; defines how long an emptied room persists in memory so inactive players can rejoin. Will be configured as EnterRoomArgs.RoomOptions.EmptyRoomTtl when creating a Photon room. More...
 
bool EnableCrc
 Enable CRC for Photon networking to detect corrupted packages. Building the checksum with RealtimeClient.CrcEnabled has a low processing overhead but increases integrity of sent and received data. More...
 
string[] ExpectedUsers
 An optional list of users users list blocks player slots for your friends or team mates to join the room, too. Set as EnterRoomArgs.ExpectedUsers or JoinRandomRoomArgs.ExpectedUsers. More...
 
bool FastReconnectDisabled
 When false (default), ReconnectToRoomAsync(RealtimeClient, MatchmakingArguments) first attempts RealtimeClient.ReconnectAndRejoin (the fast path that reuses the existing connection state) before falling back to a full reconnect. Set to true to always use the full path, e.g. when the prior connection is known to be unrecoverable. More...
 
bool? IsRoomOpen
 Optionally set an explicit initial RoomOptions.IsOpen value. Default is true More...
 
bool? IsRoomVisible
 Optionally set an explicit initial RoomOptions.IsVisible value. Default is true More...
 
TypedLobby Lobby
 Optional Photon Realtime lobby to use for matchmaking. Used for JoinRandomRoomArgs.Lobby and EnterRoomArgs.Lobby. More...
 
int MaxPlayers
 Max clients for the Photon room. 0 = unlimited. Set on JoinRandomRoomArgs.ExpectedMaxPlayers and EnterRoomArgs.RoomOptions.MaxPlayers. More...
 
RealtimeClient NetworkClient
 Optionally provide a client object. If null a new client object is created during the matchmaking process. More...
 
AppSettings PhotonSettings
 Photon Realtime AppSettings. More...
 
int PlayerTtlInSeconds
 Player TTL setting in seconds. A non-zero value is required to enable rejoin (and therefore fast reconnect via ReconnectToRoomAsync(RealtimeClient, MatchmakingArguments)). -1 keeps the user in the room for the lifetime of the room; a positive value defines the inactive window in seconds. 0 (the default) disables rejoin entirely. Will be configured as EnterRoomArgs.RoomOptions.PlayerTtl when creating a Photon room. More...
 
string PluginName
 Photon server plugin to connect to. More...
 
string[] Plugins => string.IsNullOrEmpty(PluginName) ? new string[0] : new string[1] { PluginName }
 Returns PluginName as a string array. More...
 
MatchmakingMode RandomMatchingType
 The MatchmakingMode affects how rooms get filled for random matchmaking. By default, the server fills rooms. Set on JoinRandomRoomArgs.MatchingType More...
 
MatchmakingReconnectInformation ReconnectInformation
 Optional object to save and load reconnect information. More...
 
string RoomName
 Set a desired room name to create or join. If RoomName is null random matchmaking is used. Will be configured as EnterRoomArgs.RoomOptions.RoomName when creating a Photon room. More...
 
string SqlLobbyFilter
 Optional SQL query to filter room matches used for JoinRandomRoomArgs.SqlLobbyFilter. More...
 
object Ticket
 Optional Photon matchmaking ticket. Used for JoinRandomRoomArgs.Ticket and EnterRoomArgs.Ticket. More...
 

Properties

string? UserId [get, set]
 Creates authentication values object in field AuthValues and sets the AuthenticationValues.UserId. This property will be ignored in Json serialization. More...
 

Detailed Description

The arguments list for the matchmaking extension method ConnectToRoomAsync().

Member Function Documentation

◆ ToString()

override string Photon.Realtime.MatchmakingArguments.ToString ( )
inline

Print some fields verbose.

Returns

◆ Validate()

void Photon.Realtime.MatchmakingArguments.Validate ( )
inline

Run validation and throw on missing fields.

Exceptions
ArgumentExceptionIs thrown when some minimum configurations are missing.

Member Data Documentation

◆ PhotonSettings

AppSettings Photon.Realtime.MatchmakingArguments.PhotonSettings

Photon Realtime AppSettings.

◆ PlayerTtlInSeconds

int Photon.Realtime.MatchmakingArguments.PlayerTtlInSeconds

Player TTL setting in seconds. A non-zero value is required to enable rejoin (and therefore fast reconnect via ReconnectToRoomAsync(RealtimeClient, MatchmakingArguments)). -1 keeps the user in the room for the lifetime of the room; a positive value defines the inactive window in seconds. 0 (the default) disables rejoin entirely. Will be configured as EnterRoomArgs.RoomOptions.PlayerTtl when creating a Photon room.

◆ EmptyRoomTtlInSeconds

int Photon.Realtime.MatchmakingArguments.EmptyRoomTtlInSeconds

Empty room TTL setting in seconds. Only meaningful together with PlayerTtlInSeconds > 0; defines how long an emptied room persists in memory so inactive players can rejoin. Will be configured as EnterRoomArgs.RoomOptions.EmptyRoomTtl when creating a Photon room.

◆ RoomName

string Photon.Realtime.MatchmakingArguments.RoomName

Set a desired room name to create or join. If RoomName is null random matchmaking is used. Will be configured as EnterRoomArgs.RoomOptions.RoomName when creating a Photon room.

◆ MaxPlayers

int Photon.Realtime.MatchmakingArguments.MaxPlayers

Max clients for the Photon room. 0 = unlimited. Set on JoinRandomRoomArgs.ExpectedMaxPlayers and EnterRoomArgs.RoomOptions.MaxPlayers.

◆ CanOnlyJoin

bool Photon.Realtime.MatchmakingArguments.CanOnlyJoin

Configure if the connect request can also create rooms or if it only tries to join.

◆ AsyncConfig

AsyncConfig Photon.Realtime.MatchmakingArguments.AsyncConfig

Async configuration that include TaskFactory and global cancellation support. If null then AsyncConfig.Global is used.

◆ NetworkClient

RealtimeClient Photon.Realtime.MatchmakingArguments.NetworkClient

Optionally provide a client object. If null a new client object is created during the matchmaking process.

◆ AuthValues

AuthenticationValues Photon.Realtime.MatchmakingArguments.AuthValues

Provide authentication values for the Photon server connection. Use this in conjunction with custom authentication. This field is created when UserId is set.

◆ PluginName

string Photon.Realtime.MatchmakingArguments.PluginName

Photon server plugin to connect to.

◆ ReconnectInformation

MatchmakingReconnectInformation Photon.Realtime.MatchmakingArguments.ReconnectInformation

Optional object to save and load reconnect information.

◆ CustomProperties

PhotonHashtable Photon.Realtime.MatchmakingArguments.CustomProperties

◆ ExpectedUsers

string [] Photon.Realtime.MatchmakingArguments.ExpectedUsers

An optional list of users users list blocks player slots for your friends or team mates to join the room, too. Set as EnterRoomArgs.ExpectedUsers or JoinRandomRoomArgs.ExpectedUsers.

◆ Lobby

TypedLobby Photon.Realtime.MatchmakingArguments.Lobby

Optional Photon Realtime lobby to use for matchmaking. Used for JoinRandomRoomArgs.Lobby and EnterRoomArgs.Lobby.

◆ CustomLobbyProperties

string [] Photon.Realtime.MatchmakingArguments.CustomLobbyProperties

Optional list of room properties that are used for lobby matchmaking. Will be configured as EnterRoomArgs.RoomOptions.CustomRoomPropertiesForLobby — the subset of CustomProperties that the Master Server sends to lobby clients.

◆ SqlLobbyFilter

string Photon.Realtime.MatchmakingArguments.SqlLobbyFilter

Optional SQL query to filter room matches used for JoinRandomRoomArgs.SqlLobbyFilter.

◆ Ticket

object Photon.Realtime.MatchmakingArguments.Ticket

Optional Photon matchmaking ticket. Used for JoinRandomRoomArgs.Ticket and EnterRoomArgs.Ticket.

◆ RandomMatchingType

MatchmakingMode Photon.Realtime.MatchmakingArguments.RandomMatchingType

The MatchmakingMode affects how rooms get filled for random matchmaking. By default, the server fills rooms. Set on JoinRandomRoomArgs.MatchingType

◆ CustomRoomOptions

RoomOptions Photon.Realtime.MatchmakingArguments.CustomRoomOptions

Optionally set explicit room options to use for EnterRoomArgs.RoomOptions. No properties will be set internally when this is set (see BuildEnterRoomArgs).

◆ IsRoomVisible

bool? Photon.Realtime.MatchmakingArguments.IsRoomVisible

Optionally set an explicit initial RoomOptions.IsVisible value. Default is true

◆ IsRoomOpen

bool? Photon.Realtime.MatchmakingArguments.IsRoomOpen

Optionally set an explicit initial RoomOptions.IsOpen value. Default is true

◆ EnableCrc

bool Photon.Realtime.MatchmakingArguments.EnableCrc

Enable CRC for Photon networking to detect corrupted packages. Building the checksum with RealtimeClient.CrcEnabled has a low processing overhead but increases integrity of sent and received data.

◆ FastReconnectDisabled

bool Photon.Realtime.MatchmakingArguments.FastReconnectDisabled

When false (default), ReconnectToRoomAsync(RealtimeClient, MatchmakingArguments) first attempts RealtimeClient.ReconnectAndRejoin (the fast path that reuses the existing connection state) before falling back to a full reconnect. Set to true to always use the full path, e.g. when the prior connection is known to be unrecoverable.

◆ Plugins

string [] Photon.Realtime.MatchmakingArguments.Plugins => string.IsNullOrEmpty(PluginName) ? new string[0] : new string[1] { PluginName }

Returns PluginName as a string array.

◆ CanRejoin

bool Photon.Realtime.MatchmakingArguments.CanRejoin => PlayerTtlInSeconds > 0

Returns if a client can rejoin a room which is only valid when PlayerTtlInSeconds is greater the 0.

Property Documentation

◆ UserId

string? Photon.Realtime.MatchmakingArguments.UserId
getset

Creates authentication values object in field AuthValues and sets the AuthenticationValues.UserId. This property will be ignored in Json serialization.