Photon .NET Client API 4.1.4.8

Public Member Functions | Protected Member Functions | List of all members
Photon.Realtime.LoadBalancingPeer Class Reference

A LoadBalancingPeer provides the operations and enum definitions needed to use the LoadBalancing server application which is also used in Photon Cloud. More...

Inheritance diagram for Photon.Realtime.LoadBalancingPeer:
ExitGames.Client.Photon.PhotonPeer

Public Member Functions

 LoadBalancingPeer (ConnectionProtocol protocolType)
 Creates a Peer with specified connection protocol. You need to set the Listener before using the peer. More...
 
 LoadBalancingPeer (IPhotonPeerListener listener, ConnectionProtocol protocolType)
 Creates a Peer with specified connection protocol and a Listener for callbacks. More...
 
virtual bool OpGetRegions (string appId)
 
virtual bool OpJoinLobby (TypedLobby lobby=null)
 Joins the lobby on the Master Server, where you get a list of RoomInfos of currently open rooms. This is an async request which triggers a OnOperationResponse() call. More...
 
virtual bool OpLeaveLobby ()
 Leaves the lobby on the Master Server. This is an async request which triggers a OnOperationResponse() call. More...
 
virtual bool OpCreateRoom (EnterRoomParams opParams)
 Creates a room (on either Master or Game Server). The OperationResponse depends on the server the peer is connected to: Master will return a Game Server to connect to. Game Server will return the joined Room's data. This is an async request which triggers a OnOperationResponse() call. More...
 
virtual bool OpJoinRoom (EnterRoomParams opParams)
 Joins a room by name or creates new room if room with given name not exists. The OperationResponse depends on the server the peer is connected to: Master will return a Game Server to connect to. Game Server will return the joined Room's data. This is an async request which triggers a OnOperationResponse() call. More...
 
virtual bool OpJoinRandomRoom (OpJoinRandomRoomParams opJoinRandomRoomParams)
 Operation to join a random, available room. Overloads take additional player properties. This is an async request which triggers a OnOperationResponse() call. If all rooms are closed or full, the OperationResponse will have a returnCode of ErrorCode.NoRandomMatchFound. If successful, the OperationResponse contains a gameserver address and the name of some room. More...
 
virtual bool OpJoinRandomOrCreateRoom (OpJoinRandomRoomParams opJoinRandomRoomParams, EnterRoomParams createRoomParams)
 Only used on the Master Server. It will assign a game server and room to join-or-create. On the Game Server, the OpJoin is used with option "create if not exists". More...
 
virtual bool OpLeaveRoom (bool becomeInactive, bool sendAuthCookie=false)
 Leaves a room with option to come back later or "for good". More...
 
virtual bool OpGetGameList (TypedLobby lobby, string queryData)
 Gets a list of games matching a SQL-like where clause. More...
 
virtual bool OpFindFriends (string[] friendsToFind, FindFriendsOptions options=null)
 Request the rooms and online status for a list of friends (each client must set a unique username via OpAuthenticate). More...
 
bool OpSetCustomPropertiesOfActor (int actorNr, Hashtable actorProperties)
 
bool OpSetCustomPropertiesOfRoom (Hashtable gameProperties)
 
virtual bool OpAuthenticate (string appId, string appVersion, AuthenticationValues authValues, string regionCode, bool getLobbyStatistics)
 Sends this app's appId and appVersion to identify this application server side. This is an async request which triggers a OnOperationResponse() call. More...
 
virtual bool OpAuthenticateOnce (string appId, string appVersion, AuthenticationValues authValues, string regionCode, EncryptionMode encryptionMode, ConnectionProtocol expectedProtocol)
 Sends this app's appId and appVersion to identify this application server side. This is an async request which triggers a OnOperationResponse() call. More...
 
virtual bool OpChangeGroups (byte[] groupsToRemove, byte[] groupsToAdd)
 Operation to handle this client's interest groups (for events in room). More...
 
virtual bool OpRaiseEvent (byte eventCode, object customEventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions)
 Send an event with custom code/type and any content to the other players in the same room. More...
 
virtual bool OpSettings (bool receiveLobbyStats)
 Internally used operation to set some "per server" settings. This is for the Master Server. More...
 
- Public Member Functions inherited from ExitGames.Client.Photon.PhotonPeer
string CommandLogToString ()
 Obsolete and ignored. Converts the CommandLog into a readable table-like string with summary. More...
 
void TrafficStatsReset ()
 Creates new instances of TrafficStats and starts a new timer for those. More...
 
string VitalStatsToString (bool all)
 Returns a string of the most interesting connection statistics. When you have issues on the client side, these might contain hints about the issue's cause. More...
 
 PhotonPeer (ConnectionProtocol protocolType)
 Creates a new PhotonPeer with specified transport protocol (without a IPhotonPeerListener). More...
 
 PhotonPeer (IPhotonPeerListener listener, ConnectionProtocol protocolType)
 Creates a new PhotonPeer instance to communicate with Photon and selects the transport protocol. We recommend UDP. More...
 
virtual bool Connect (string serverAddress, string appId, object custom=null)
 Starts connecting to the given Photon server. Non-blocking. More...
 
virtual bool Connect (string serverAddress, string proxyServerAddress, string appId, object custom)
 Starts connecting to the given Photon server. Non-blocking. More...
 
virtual void Disconnect ()
 This method initiates a mutual disconnect between this client and the server. More...
 
virtual void StopThread ()
 This method immediately closes a connection (pure client side) and ends related listening Threads. More...
 
virtual void FetchServerTimestamp ()
 This will fetch the server's timestamp and update the approximation for property ServerTimeInMilliseconds. More...
 
bool EstablishEncryption ()
 This method creates a public key for this client and exchanges it with the server. More...
 
bool InitDatagramEncryption (byte[] encryptionSecret, byte[] hmacSecret, bool randomizedSequenceNumbers=false, bool chaningModeGCM=false)
 Initializes Datagram Encryption. Optionally, the EncryptorType is being used, if set. More...
 
void InitPayloadEncryption (byte[] secret)
 Photon's Payload Encryption secret may be set by a response from the server. More...
 
virtual void Service ()
 This method excutes DispatchIncomingCommands and SendOutgoingCommands in your application Thread-context. More...
 
virtual bool SendOutgoingCommands ()
 Creates and sends a UDP/TCP package with outgoing commands (operations and acknowledgements). Also called by Service(). More...
 
virtual bool SendAcksOnly ()
 
virtual bool DispatchIncomingCommands ()
 Dispatching received messages (commands), causes callbacks for events, responses and state changes within a IPhotonPeerListener. More...
 
virtual bool SendOperation (byte operationCode, Dictionary< byte, object > operationParameters, SendOptions sendOptions)
 Prepares your operation (code and parameters) to be sent to the Photon Server with specified SendOptions. More...
 
virtual bool SendOperation (byte operationCode, ParameterDictionary operationParameters, SendOptions sendOptions)
 

Protected Member Functions

bool OpSetPropertyOfRoom (byte propCode, object value)
 

Additional Inherited Members

- Static Public Member Functions inherited from ExitGames.Client.Photon.PhotonPeer
static void MessageBufferPoolTrim (int countOfBuffers)
 Sets a new (temporary) size of the MessageBufferPool to reuse memory where possible. More...
 
static int MessageBufferPoolSize ()
 
static bool RegisterType (Type customType, byte code, SerializeMethod serializeMethod, DeserializeMethod constructor)
 Registers new types/classes for de/serialization and the fitting methods to call for this type. More...
 
static bool RegisterType (Type customType, byte code, SerializeStreamMethod serializeMethod, DeserializeStreamMethod constructor)
 
- Public Attributes inherited from ExitGames.Client.Photon.PhotonPeer
int WarningSize
 The WarningSize was used test all message queues for congestion. More...
 
int CommandLogSize
 Obsolete and ignored. Size of CommandLog. Default is 0, no logging. More...
 
TargetFrameworks TargetFramework = TargetFrameworks.Net35
 Target framework this dll was built for. More...
 
bool RemoveAppIdFromWebSocketPath
 Can be used to remove/hide the AppId from websocket connect paths. More...
 
Dictionary< ConnectionProtocol, Type > SocketImplementationConfig
 Optional definition of IPhotonSocket type per ConnectionProtocol. More...
 
DebugLevel DebugOut = DebugLevel.ERROR
 Sets the level (and amount) of debug output provided by the library. More...
 
bool SendInCreationOrder = true
 This debug setting enables a new send-ordering for commands. Defaults to true and commands are sent in the order they are created. Set to false to use Enet ordering. More...
 
ITrafficRecorder TrafficRecorder
 If set, the TrafficRecorder will be used to capture all traffic. More...
 
byte ChannelCount = 2
 Gets / sets the number of channels available in UDP connections with Photon. Photon Channels are only supported for UDP. The default ChannelCount is 2. Channel IDs start with 0 and 255 is a internal channel. More...
 
bool EnableEncryptedFlag = false
 Enables the client so send the "encrypted" flag on secure connections. Incompatible with Server SDK 4.x. More...
 
int SentCountAllowance = 7
 Number of send retries before a peer is considered lost/disconnected. Default: 7. More...
 
int InitialResendTimeMax = 400
 Caps the initial timing for repeats of reliable commands. In milliseconds. Default: 400ms. More...
 
int TimePingInterval = 1000
 Sets the time between pings being sent automatically. They measure the roundtrip time and keep connections from closing. Default: 1000. More...
 
- Static Public Attributes inherited from ExitGames.Client.Photon.PhotonPeer
const bool NativeDatagramEncrypt = true
 Where dynamic linking is available, this library will attempt to load a native Photon "Encryptor" plugin library for "Datagram Encryption". More...
 
const bool NoSocket = false
 False if this library build contains C# Socket code. If true, you must set some type as SocketImplementation before connecting. More...
 
const bool DebugBuild = false
 True if the library was compiled with DEBUG setting. More...
 
const int NativeEncryptorApiVersion = 2
 Version of the Native Encryptor API compiled into this assembly. Defines which PhotonEncryptorPlugin needs to be used. More...
 
static bool NoNativeCallbacks
 Global toggle to avoid callbacks from native plugins. Defaults to false, meaning: "callbacks enabled". More...
 
static int OutgoingStreamBufferSize = 1200
 Defines the initial size of an internally used StreamBuffer for Tcp. The StreamBuffer is used to aggregate operation into (less) send calls, which uses less resoures. More...
 
static bool AsyncKeyExchange = false
 Defines if Key Exchange for Encryption is done asynchronously in another thread. More...
 
- Properties inherited from ExitGames.Client.Photon.PhotonPeer
int CommandBufferSize [get, set]
 No effect anymore. Removed without replacement. More...
 
int LimitOfUnreliableCommands [get, set]
 No effect anymore. Removed without replacement. More...
 
int LocalTimeInMilliSeconds [get]
 Gets a local timestamp in milliseconds by calling SupportClass.GetTickCount(). See LocalMsTimestampDelegate. More...
 
string ClientVersion [get]
 Version of this library as string. More...
 
static bool NativeSocketLibAvailable [get]
 Checks if a native library for network sockets (PhotonSocketPlugin.dll) is available. To use it, see remarks. More...
 
static bool NativePayloadEncryptionLibAvailable [get]
 Checks if native library for Payload Encryption (PhotonCryptoPlugin.dll) is available. Used automatically. More...
 
static bool NativeDatagramEncryptionLibAvailable [get]
 Checks if a native library for Datagram Encryption is available. To use it, see remarks. More...
 
SerializationProtocol SerializationProtocolType [get, set]
 Enables selection of a (Photon-)serialization protocol. Used in Connect methods. More...
 
Type SocketImplementation [get, set]
 Can be used to read the IPhotonSocket implementation at runtime (before connecting). More...
 
IPhotonPeerListener Listener [get, protected set]
 Gets the IPhotonPeerListener of this instance (set in constructor). Can be used in derived classes for Listener.DebugReturn(). More...
 
bool ReuseEventInstance [get, set]
 Option to make the PhotonPeer reuse a single EventData instance for all incoming events. More...
 
bool UseByteArraySlicePoolForEvents [get, set]
 Enables a deserialization optimization for incoming events. Defaults to false. More...
 
bool WrapIncomingStructs [get, set]
 Incoming struct types are wrapped in a pooled IWrapperStruct, rather than being cast to object. This eliminated allocations and garbage collection from boxing, however object that are wrapped structs will need to be cast to WrapperStruct<T> and their values extracted with (obj as WrapperStruct<T>).Value. More...
 
ByteArraySlicePool ByteArraySlicePool [get]
 Instance of a ByteArraySlicePool. UseByteArraySlicePoolForEvents defines if this PhotonPeer is using the pool for deserialization of byte[] in Photon events. More...
 
long BytesIn [get]
 Gets count of all bytes coming in (including headers, excluding UDP/TCP overhead) More...
 
long BytesOut [get]
 Gets count of all bytes going out (including headers, excluding UDP/TCP overhead) More...
 
int ByteCountCurrentDispatch [get]
 Gets the size of the dispatched event or operation-result in bytes. This value is set before OnEvent() or OnOperationResponse() is called (within DispatchIncomingCommands()). More...
 
string? CommandInfoCurrentDispatch [get]
 Returns the debug string of the event or operation-response currently being dispatched or string. Empty if none. More...
 
int ByteCountLastOperation [get]
 Gets the size of the last serialized operation call in bytes. The value includes all headers for this single operation but excludes those of UDP, Enet Package Headers and TCP. More...
 
bool EnableServerTracing [get, set]
 Debugging option to tell the Photon Server to log all datagrams. More...
 
byte QuickResendAttempts [get, set]
 Up to 4 resend attempts for a reliable command can be done in quick succession (after RTT+4*Variance). More...
 
PeerStateValue PeerState [get]
 This is the (low level) state of the connection to the server of a PhotonPeer. Managed internally and read-only. More...
 
string PeerID [get]
 This peer's ID as assigned by the server or 0 if not using UDP. Will be 0xFFFF before the client connects. More...
 
int QueuedIncomingCommands [get]
 Count of all currently received but not-yet-Dispatched reliable commands (events and operation results) from all channels. More...
 
int QueuedOutgoingCommands [get]
 Count of all commands currently queued as outgoing, including all channels and reliable, unreliable. More...
 
bool CrcEnabled [get, set]
 While not connected, this controls if the next connection(s) should use a per-package CRC checksum. More...
 
int PacketLossByCrc [get]
 Count of packages dropped due to failed CRC checks for this connection. More...
 
int PacketLossByChallenge [get]
 Count of packages dropped due to wrong challenge for this connection. More...
 
int SentReliableCommandsCount [get]
 Gets the count of sent but not yet acknowledged commands (for UDP connections). More...
 
int? ResentReliableCommands [get]
 Count of commands that got repeated (due to local repeat-timing before an ACK was received). More...
 
int DisconnectTimeout [get, set]
 Time in milliseconds before any sent reliable command triggers a timeout disconnect, unless acknowledged by the receiver. Default: 10000. More...
 
int? ServerTimeInMilliSeconds [get]
 Approximated Environment.TickCount value of server (while connected). More...
 
SupportClass.IntegerMillisecondsDelegate LocalMsTimestampDelegate [set]
 This setter for the (local-) timestamp delegate replaces the default Environment.TickCount with any equal function. More...
 
int ConnectionTime [get]
 The internally used "per connection" time value, which is updated infrequently, when the library executes some connectio-related tasks. More...
 
int LastSendAckTime [get]
 The last ConnectionTime value, when some ACKs were sent out by this client. More...
 
int LastSendOutgoingTime [get]
 The last ConnectionTime value, when SendOutgoingCommands actually checked outgoing queues to send them. Must be connected. More...
 
int LongestSentCall [get, set]
 Measures the maximum milliseconds spent in PhotonSocket.Send(). More...
 
int RoundTripTime [get]
 Time until a reliable command is acknowledged by the server. More...
 
int RoundTripTimeVariance [get]
 Changes of the roundtriptime as variance value. Gives a hint about how much the time is changing. More...
 
int LastRoundTripTime [get]
 The last measured roundtrip time for this connection. More...
 
int TimestampOfLastSocketReceive [get]
 Timestamp of the last time anything (!) was received from the server (including low level Ping, ACKs, events and operation-returns). More...
 
string ServerAddress [get]
 The server address which was used in PhotonPeer.Connect() or null (before Connect() was called). More...
 
string ServerIpAddress [get]
 Contains the IP address of the previously resolved ServerAddress (or empty, if address wasn't resolved with the internal methods). More...
 
ConnectionProtocol UsedProtocol [get]
 The protocol this peer is currently connected/connecting with (or 0). More...
 
ConnectionProtocol TransportProtocol [get, set]
 This is the transport protocol to be used for next connect (see remarks). More...
 
virtual bool IsSimulationEnabled [get, set]
 Gets or sets the network simulation "enabled" setting. Changing this value also locks this peer's sending and when setting false, the internally used queues are executed (so setting to false can take some cycles). More...
 
NetworkSimulationSet NetworkSimulationSettings [get]
 Gets the settings for built-in Network Simulation for this peer instance while IsSimulationEnabled will enable or disable them. Once obtained, the settings can be modified by changing the properties. More...
 
int MaximumTransferUnit [get, set]
 The Maximum Trasfer Unit (MTU) defines the (network-level) packet-content size that is guaranteed to arrive at the server in one piece. The Photon Protocol uses this size to split larger data into packets and for receive-buffers of packets. More...
 
bool IsEncryptionAvailable [get]
 This property is set internally, when OpExchangeKeysForEncryption successfully finished. While it's true, encryption can be used for operations. More...
 
bool IsSendingOnlyAcks [get, set]
 While true, the peer will not send any other commands except ACKs (used in UDP connections). More...
 
TrafficStats TrafficStatsIncoming [get, set]
 Gets the byte-count of incoming "low level" messages, which are either Enet Commands or Tcp Messages. These include all headers, except those of the underlying internet protocol Udp or Tcp. More...
 
TrafficStats TrafficStatsOutgoing [get, set]
 Gets the byte-count of outgoing "low level" messages, which are either Enet Commands or Tcp Messages. These include all headers, except those of the underlying internet protocol Udp or Tcp. More...
 
TrafficStatsGameLevel TrafficStatsGameLevel [get, set]
 Gets a statistic of incoming and outgoing traffic, split by operation, operation-result and event. More...
 
long? TrafficStatsElapsedMs [get]
 Returns the count of milliseconds the stats are enabled for tracking. More...
 
bool TrafficStatsEnabled [get, set]
 Enables or disables collection of statistics in TrafficStatsIncoming, TrafficStatsOutgoing and TrafficstatsGameLevel. More...
 
Type EncryptorType [get, set]
 Setter for the Datagram Encryptor instance. Used at next connect. More...
 
int CountDiscarded [get, set]
 Count of unreliable commands being discarded in case this client already dispatched a command that was newer (higher sequence number). More...
 
int DeltaUnreliableNumber [get, set]
 Set per dispatch in DispatchIncomingCommands to: commandUnreliableSequenceNumber - channel.incomingUnreliableSequenceNumber. Indicates how big the (sequence)gap is, compared to the last dispatched unreliable command. More...
 
- Events inherited from ExitGames.Client.Photon.PhotonPeer
Action< DisconnectMessageOnDisconnectMessage
 Called when the client received a Disconnect Message from the server. Signals an error and provides a message to debug the case. More...
 

Detailed Description

A LoadBalancingPeer provides the operations and enum definitions needed to use the LoadBalancing server application which is also used in Photon Cloud.

This class is internally used. The LoadBalancingPeer does not keep a state, instead this is done by a LoadBalancingClient.

Constructor & Destructor Documentation

◆ LoadBalancingPeer() [1/2]

Photon.Realtime.LoadBalancingPeer.LoadBalancingPeer ( ConnectionProtocol  protocolType)
inline

Creates a Peer with specified connection protocol. You need to set the Listener before using the peer.

Each connection protocol has it's own default networking ports for Photon.

Parameters
protocolTypeThe preferred option is UDP.

◆ LoadBalancingPeer() [2/2]

Photon.Realtime.LoadBalancingPeer.LoadBalancingPeer ( IPhotonPeerListener  listener,
ConnectionProtocol  protocolType 
)
inline

Creates a Peer with specified connection protocol and a Listener for callbacks.

Member Function Documentation

◆ OpAuthenticate()

virtual bool Photon.Realtime.LoadBalancingPeer.OpAuthenticate ( string  appId,
string  appVersion,
AuthenticationValues  authValues,
string  regionCode,
bool  getLobbyStatistics 
)
inlinevirtual

Sends this app's appId and appVersion to identify this application server side. This is an async request which triggers a OnOperationResponse() call.

This operation makes use of encryption, if that is established before. See: EstablishEncryption(). Check encryption with IsEncryptionAvailable. This operation is allowed only once per connection (multiple calls will have ErrorCode != Ok).

Parameters
appIdYour application's name or ID to authenticate. This is assigned by Photon Cloud (webpage).
appVersionThe client's version (clients with differing client appVersions are separated and players don't meet).
authValuesContains all values relevant for authentication. Even without account system (external Custom Auth), the clients are allowed to identify themselves.
regionCodeOptional region code, if the client should connect to a specific Photon Cloud Region.
getLobbyStatisticsSet to true on Master Server to receive "Lobby Statistics" events.
Returns
If the operation could be sent (has to be connected).

◆ OpAuthenticateOnce()

virtual bool Photon.Realtime.LoadBalancingPeer.OpAuthenticateOnce ( string  appId,
string  appVersion,
AuthenticationValues  authValues,
string  regionCode,
EncryptionMode  encryptionMode,
ConnectionProtocol  expectedProtocol 
)
inlinevirtual

Sends this app's appId and appVersion to identify this application server side. This is an async request which triggers a OnOperationResponse() call.

This operation makes use of encryption, if that is established before. See: EstablishEncryption(). Check encryption with IsEncryptionAvailable. This operation is allowed only once per connection (multiple calls will have ErrorCode != Ok).

Parameters
appIdYour application's name or ID to authenticate. This is assigned by Photon Cloud (webpage).
appVersionThe client's version (clients with differing client appVersions are separated and players don't meet).
authValuesOptional authentication values. The client can set no values or a UserId or some parameters for Custom Authentication by a server.
regionCodeOptional region code, if the client should connect to a specific Photon Cloud Region.
encryptionMode
expectedProtocol
Returns
If the operation could be sent (has to be connected).

◆ OpChangeGroups()

virtual bool Photon.Realtime.LoadBalancingPeer.OpChangeGroups ( byte[]  groupsToRemove,
byte[]  groupsToAdd 
)
inlinevirtual

Operation to handle this client's interest groups (for events in room).

Note the difference between passing null and byte[0]: null won't add/remove any groups. byte[0] will add/remove all (existing) groups. First, removing groups is executed. This way, you could leave all groups and join only the ones provided.

Changes become active not immediately but when the server executes this operation (approximately RTT/2).

Parameters
groupsToRemoveGroups to remove from interest. Null will not remove any. A byte[0] will remove all.
groupsToAddGroups to add to interest. Null will not add any. A byte[0] will add all current.
Returns
If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.

◆ OpCreateRoom()

virtual bool Photon.Realtime.LoadBalancingPeer.OpCreateRoom ( EnterRoomParams  opParams)
inlinevirtual

Creates a room (on either Master or Game Server). The OperationResponse depends on the server the peer is connected to: Master will return a Game Server to connect to. Game Server will return the joined Room's data. This is an async request which triggers a OnOperationResponse() call.

If the room is already existing, the OperationResponse will have a returnCode of ErrorCode.GameAlreadyExists.

◆ OpFindFriends()

virtual bool Photon.Realtime.LoadBalancingPeer.OpFindFriends ( string[]  friendsToFind,
FindFriendsOptions  options = null 
)
inlinevirtual

Request the rooms and online status for a list of friends (each client must set a unique username via OpAuthenticate).

Used on Master Server to find the rooms played by a selected list of users. Users identify themselves by using OpAuthenticate with a unique user ID. The list of user IDs must be fetched from some other source (not provided by Photon).

The server response includes 2 arrays of info (each index matching a friend from the request):
ParameterCode.FindFriendsResponseOnlineList = bool[] of online states
ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)

The options may be used to define which state a room must match to be returned.

Parameters
friendsToFindArray of friend's names (make sure they are unique).
optionsOptions that affect the result of the FindFriends operation.
Returns
If the operation could be sent (requires connection).

◆ OpGetGameList()

virtual bool Photon.Realtime.LoadBalancingPeer.OpGetGameList ( TypedLobby  lobby,
string  queryData 
)
inlinevirtual

Gets a list of games matching a SQL-like where clause.

Operation is only available in lobbies of type SqlLobby. This is an async request which triggers a OnOperationResponse() call. Returned game list is stored in RoomInfoList.

https://doc.photonengine.com/en-us/realtime/current/reference/matchmaking-and-lobby::sql_lobby_type

Parameters
lobbyThe lobby to query. Has to be of type SqlLobby.
queryDataThe sql query statement.
Returns
If the operation could be sent (has to be connected).

◆ OpGetRegions()

virtual bool Photon.Realtime.LoadBalancingPeer.OpGetRegions ( string  appId)
inlinevirtual

◆ OpJoinLobby()

virtual bool Photon.Realtime.LoadBalancingPeer.OpJoinLobby ( TypedLobby  lobby = null)
inlinevirtual

Joins the lobby on the Master Server, where you get a list of RoomInfos of currently open rooms. This is an async request which triggers a OnOperationResponse() call.

Parameters
lobbyThe lobby join to.
Returns
If the operation could be sent (has to be connected).

◆ OpJoinRandomOrCreateRoom()

virtual bool Photon.Realtime.LoadBalancingPeer.OpJoinRandomOrCreateRoom ( OpJoinRandomRoomParams  opJoinRandomRoomParams,
EnterRoomParams  createRoomParams 
)
inlinevirtual

Only used on the Master Server. It will assign a game server and room to join-or-create. On the Game Server, the OpJoin is used with option "create if not exists".

◆ OpJoinRandomRoom()

virtual bool Photon.Realtime.LoadBalancingPeer.OpJoinRandomRoom ( OpJoinRandomRoomParams  opJoinRandomRoomParams)
inlinevirtual

Operation to join a random, available room. Overloads take additional player properties. This is an async request which triggers a OnOperationResponse() call. If all rooms are closed or full, the OperationResponse will have a returnCode of ErrorCode.NoRandomMatchFound. If successful, the OperationResponse contains a gameserver address and the name of some room.

Returns
If the operation could be sent currently (requires connection).

◆ OpJoinRoom()

virtual bool Photon.Realtime.LoadBalancingPeer.OpJoinRoom ( EnterRoomParams  opParams)
inlinevirtual

Joins a room by name or creates new room if room with given name not exists. The OperationResponse depends on the server the peer is connected to: Master will return a Game Server to connect to. Game Server will return the joined Room's data. This is an async request which triggers a OnOperationResponse() call.

If the room is not existing (anymore), the OperationResponse will have a returnCode of ErrorCode.GameDoesNotExist. Other possible ErrorCodes are: GameClosed, GameFull.

Returns
If the operation could be sent (requires connection).

◆ OpLeaveLobby()

virtual bool Photon.Realtime.LoadBalancingPeer.OpLeaveLobby ( )
inlinevirtual

Leaves the lobby on the Master Server. This is an async request which triggers a OnOperationResponse() call.

Returns
If the operation could be sent (requires connection).

◆ OpLeaveRoom()

virtual bool Photon.Realtime.LoadBalancingPeer.OpLeaveRoom ( bool  becomeInactive,
bool  sendAuthCookie = false 
)
inlinevirtual

Leaves a room with option to come back later or "for good".

Parameters
becomeInactiveAsync games can be re-joined (loaded) later on. Set to false, if you want to abandon a game entirely.
sendAuthCookieWebFlag: Securely transmit the encrypted object AuthCookie to the web service in PathLeave webhook when available
Returns
If the opteration can be send currently.

◆ OpRaiseEvent()

virtual bool Photon.Realtime.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
object  customEventContent,
RaiseEventOptions  raiseEventOptions,
SendOptions  sendOptions 
)
inlinevirtual

Send an event with custom code/type and any content to the other players in the same room.

This override explicitly uses another parameter order to not mix it up with the implementation for Hashtable only.

Parameters
eventCodeIdentifies this type of event (and the content). Your game's event codes can start with 0.
customEventContentAny serializable datatype (including Hashtable like the other OpRaiseEvent overloads).
raiseEventOptionsContains (slightly) less often used options. If you pass null, the default options will be used.
sendOptionsSend options for reliable, encryption etc
Returns
If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.

◆ OpSetCustomPropertiesOfActor()

bool Photon.Realtime.LoadBalancingPeer.OpSetCustomPropertiesOfActor ( int  actorNr,
Hashtable  actorProperties 
)
inline

◆ OpSetCustomPropertiesOfRoom()

bool Photon.Realtime.LoadBalancingPeer.OpSetCustomPropertiesOfRoom ( Hashtable  gameProperties)
inline

◆ OpSetPropertyOfRoom()

bool Photon.Realtime.LoadBalancingPeer.OpSetPropertyOfRoom ( byte  propCode,
object  value 
)
inlineprotected

◆ OpSettings()

virtual bool Photon.Realtime.LoadBalancingPeer.OpSettings ( bool  receiveLobbyStats)
inlinevirtual

Internally used operation to set some "per server" settings. This is for the Master Server.

Parameters
receiveLobbyStatsSet to true, to get Lobby Statistics (lists of existing lobbies).
Returns
False if the operation could not be sent.

The documentation for this class was generated from the following file: