Photon .NET Client API
Classes | Public Member Functions | List of all members
ExitGames.Client.Photon.LoadBalancing.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 ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer:
ExitGames.Client.Photon.PhotonPeer

Classes

class  EnterRoomParams
 
class  OpJoinRandomRoomParams
 

Public Member Functions

 LoadBalancingPeer (ConnectionProtocol protocolType)
 Creates a Peer with selected connection protocol. More...
 
 LoadBalancingPeer (IPhotonPeerListener listener, ConnectionProtocol protocolType)
 Creates a Peer with default connection protocol (UDP). More...
 
virtual bool OpGetRegions (string appId)
 
virtual bool OpJoinLobby ()
 Calls OpJoinLobby(string name, LobbyType lobbyType). More...
 
virtual bool OpJoinLobby (TypedLobby lobby)
 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 OpLeaveRoom (bool becomeInactive)
 Leaves a room with option to come back later or "for good". More...
 
virtual bool OpFindFriends (string[] friendsToFind)
 Request the rooms and online status for a list of friends (each client must set a unique username via OpAuthenticate). More...
 
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 OpChangeGroups (byte[] groupsToRemove, byte[] groupsToAdd)
 Operation to handle this client's interest groups (for events in room). More...
 
virtual bool OpRaiseEvent (byte eventCode, bool sendReliable, object customEventContent)
 Send an event with custom code/type and any content to the other players in the same room. More...
 
virtual bool OpRaiseEvent (byte eventCode, bool sendReliable, object customEventContent, byte channelId, EventCaching cache, int[] targetActors, ReceiverGroup receivers, byte interestGroup)
 Send an event with custom code/type and any content to the other players in the same room. More...
 
virtual bool OpRaiseEvent (byte eventCode, bool sendReliable, object customEventContent, byte channelId, EventCaching cache, int[] targetActors, ReceiverGroup receivers, byte interestGroup, bool forwardToWebhook)
 Send an event with custom code/type and any content to the other players in the same room. More...
 
virtual bool OpRaiseEvent (byte eventCode, byte interestGroup, Hashtable customEventContent, bool sendReliable)
 Send your custom data as event to an "interest group" in the current Room. More...
 
virtual bool OpRaiseEvent (byte eventCode, Hashtable evData, bool sendReliable, byte channelId)
 Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation. This is an async request will trigger a OnOperationResponse() call only in error-cases, because it's called many times per second and can hardly fail. More...
 
virtual bool OpRaiseEvent (byte eventCode, Hashtable evData, bool sendReliable, byte channelId, int[] targetActors)
 Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation. More...
 
virtual bool OpRaiseEvent (byte eventCode, Hashtable evData, bool sendReliable, byte channelId, int[] targetActors, EventCaching cache)
 Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation. More...
 
virtual bool OpRaiseEvent (byte eventCode, Hashtable evData, bool sendReliable, byte channelId, EventCaching cache, ReceiverGroup receivers)
 Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation. More...
 
virtual bool OpRaiseEvent (byte eventCode, object customEventContent, bool sendReliable, RaiseEventOptions raiseEventOptions)
 Send an event with custom code/type and any content to the other players in the same room. More...
 
- Public Member Functions inherited from ExitGames.Client.Photon.PhotonPeer
void TrafficStatsReset ()
 Creates new instances of TrafficStats and starts a new timer for those. More...
 
string CommandLogToString ()
 Converts the CommandLog into a readable table-like string with summary. More...
 
 PhotonPeer (ConnectionProtocol protocolType)
 
 PhotonPeer (IPhotonPeerListener listener, ConnectionProtocol protocolType)
 Creates a new PhotonPeer instance to communicate with Photon and selects either UDP or TCP as protocol. We recommend UDP. More...
 
 PhotonPeer (IPhotonPeerListener listener)
 Creates a new PhotonPeer instance to communicate with Photon. More...
 
 PhotonPeer (IPhotonPeerListener listener, bool useTcp)
 Deprecated. Please use: PhotonPeer(IPhotonPeerListener listener, ConnectionProtocol protocolType). More...
 
virtual bool Connect (String serverAddress, String applicationName)
 This method does a DNS lookup (if necessary) and connects to the given serverAddress. 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...
 
virtual void Service ()
 This method excutes DispatchIncomingCommands and SendOutgoingCommands in your application Thread-context. More...
 
virtual bool SendOutgoingCommands ()
 This method creates a UDP/TCP package for outgoing commands (operations and acknowledgements) and sends them to the server. This method is also called by Service(). More...
 
virtual bool SendAcksOnly ()
 
virtual bool DispatchIncomingCommands ()
 This method directly causes the callbacks for events, responses and state changes within a IPhotonPeerListener. DispatchIncomingCommands only executes a single received command per call. If a command was dispatched, the return value is true and the method should be called again. This method is called by Service() until currently available commands are dispatched. 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...
 
virtual bool OpCustom (byte customOpCode, Dictionary< byte, object > customOpParameters, bool sendReliable)
 Channel-less wrapper for OpCustom(). More...
 
virtual bool OpCustom (byte customOpCode, Dictionary< byte, object > customOpParameters, bool sendReliable, byte channelId)
 Allows the client to send any operation to the Photon Server by setting any opCode and the operation's parameters. More...
 
virtual bool OpCustom (byte customOpCode, Dictionary< byte, object > customOpParameters, bool sendReliable, byte channelId, bool encrypt)
 Allows the client to send any operation to the Photon Server by setting any opCode and the operation's parameters. More...
 
virtual bool OpCustom (OperationRequest operationRequest, bool sendReliable, byte channelId, bool encrypt)
 Allows the client to send any operation to the Photon Server by setting any opCode and the operation's parameters. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ExitGames.Client.Photon.PhotonPeer
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
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...
 
- Properties inherited from ExitGames.Client.Photon.PhotonPeer
Type SocketImplementation [get, set]
 Can be used to set a UDP IPhotonSocket implementation at runtime (before connecting) in compatible DLL builds. More...
 
DebugLevel DebugOut [get, set]
 Sets the level (and amount) of debug output provided by the library. More...
 
IPhotonPeerListener Listener [get, set]
 Gets the IPhotonPeerListener of this instance (set in constructor). Can be used in derived classes for Listener.DebugReturn(). 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 TrafficStatsEnabled [get, set]
 Enables the traffic statistics of a peer: TrafficStatsIncoming, TrafficStatsOutgoing and TrafficstatsGameLevel (nothing else). Default value: false (disabled). More...
 
long TrafficStatsElapsedMs [get]
 Returns the count of milliseconds the stats are enabled for tracking. More...
 
TrafficStats TrafficStatsIncoming [get]
 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]
 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]
 Gets a statistic of incoming and outgoing traffic, split by operation, operation-result and event. More...
 
int CommandLogSize [get, set]
 Size of CommandLog. Default is 0, no logging. 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 CommandBufferSize [get]
 Initial size internal lists for incoming/outgoing commands (reliable and unreliable). More...
 
int RhttpMinConnections [get, set]
 (default=2) minimum number of open connections More...
 
int RhttpMaxConnections [get, set]
 (default=6) maximum number of open connections, should be > RhttpMinConnections More...
 
int LimitOfUnreliableCommands [get, set]
 Limits the queue of received unreliable commands within DispatchIncomingCommands before dispatching them. This works only in UDP. This limit is applied when you call DispatchIncomingCommands. If this client (already) received more than LimitOfUnreliableCommands, it will throw away the older ones instead of dispatching them. This can produce bigger gaps for unreliable commands but your client catches up faster. 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...
 
byte ChannelCount [get, set]
 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 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 ResentReliableCommands [get]
 Count of commands that got repeated (due to local repeat-timing before an ACK was received). More...
 
int WarningSize [get, set]
 The WarningSize is used test all message queues for congestion (in and out, reliable and unreliable). OnStatusChanged will be called with a warning if a queue holds WarningSize commands or a multiple of it. Default: 100. Example: If command is received, OnStatusChanged will be called when the respective command queue has 100, 200, 300 ... items. More...
 
int SentCountAllowance [get, set]
 Number of send retries before a peer is considered lost/disconnected. Default: 5. The initial timeout countdown of a command is calculated by the current roundTripTime + 4 * roundTripTimeVariance. Please note that the timeout span until a command will be resent is not constant, but based on the roundtrip time at the initial sending, which will be doubled with every failed retry. More...
 
int TimePingInterval [get, set]
 Sets the milliseconds without reliable command before a ping command (reliable) will be sent (Default: 1000ms). The ping command is used to keep track of the connection in case the client does not send reliable commands by itself. A ping (or reliable commands) will update the RoundTripTime calculation. More...
 
int DisconnectTimeout [get, set]
 Milliseconds after which a reliable UDP command triggers a timeout disconnect, unless acknowledged by server. This value currently only affects UDP connections. DisconnectTimeout is not an exact value for a timeout. The exact timing of the timeout depends on the frequency of Service() calls and commands that are sent with long roundtrip-times and variance are checked less often for re-sending! More...
 
int ServerTimeInMilliSeconds [get]
 Approximated Environment.TickCount value of server (while connected). 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 LocalTimeInMilliSeconds [get]
 Gets a local timestamp in milliseconds by calling SupportClass.GetTickCount(). See LocalMsTimestampDelegate. More...
 
SupportClass.IntegerMillisecondsDelegate LocalMsTimestampDelegate [set]
 This setter for the (local-) timestamp delegate replaces the default Environment.TickCount with any equal function. 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 TimestampOfLastSocketReceive [get]
 Stores timestamp of the last time anything (!) was received from the server (including low level Ping and ACKs but also events and operation-returns). This is not the time when something was dispatched. If you enable NetworkSimulation, this value is affected as well. More...
 
string ServerAddress [get, set]
 The server address which was used in PhotonPeer.Connect() or null (before Connect() was called). More...
 
ConnectionProtocol UsedProtocol [get]
 The protocol this Peer uses to connect to Photon. 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...
 
static int OutgoingStreamBufferSize [get, set]
 Defines the initial size of an internally used MemoryStream for Tcp. The MemoryStream is used to aggregate operation into (less) send calls, which uses less resoures. 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...
 

Detailed Description

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

The LoadBalancingPeer does not keep a state, instead this is done by a LoadBalancingClient.

Constructor & Destructor Documentation

ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.LoadBalancingPeer ( ConnectionProtocol  protocolType)
inline

Creates a Peer with selected connection protocol.

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

Parameters
protocolTypeThe preferred option is UDP.
ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.LoadBalancingPeer ( IPhotonPeerListener  listener,
ConnectionProtocol  protocolType 
)
inline

Creates a Peer with default connection protocol (UDP).

Member Function Documentation

virtual bool ExitGames.Client.Photon.LoadBalancing.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).
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.
getLobbyStatisticsSet to true on Master Server to receive "Lobby Statistics" events.
Returns
If the operation could be sent (has to be connected).
virtual bool ExitGames.Client.Photon.LoadBalancing.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 leave 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
virtual bool ExitGames.Client.Photon.LoadBalancing.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.

virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpFindFriends ( string[]  friendsToFind)
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 username. The list of usernames 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)

Parameters
friendsToFindArray of friend's names (make sure they are unique).
Returns
If the operation could be sent (requires connection).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpGetRegions ( string  appId)
inlinevirtual
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpJoinLobby ( )
inlinevirtual

Calls OpJoinLobby(string name, LobbyType lobbyType).

Returns
If the operation could be sent (requires connection).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpJoinLobby ( TypedLobby  lobby)
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).
virtual bool ExitGames.Client.Photon.LoadBalancing.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).
virtual bool ExitGames.Client.Photon.LoadBalancing.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).
virtual bool ExitGames.Client.Photon.LoadBalancing.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).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpLeaveRoom ( bool  becomeInactive)
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.
Returns
If the opteration can be send currently.
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
bool  sendReliable,
object  customEventContent 
)
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.
sendReliableIf this event has to arrive reliably (potentially repeated if it's lost).
customEventContentAny serializable datatype (including Hashtable like the other OpRaiseEvent overloads).
Returns
If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
bool  sendReliable,
object  customEventContent,
byte  channelId,
EventCaching  cache,
int[]  targetActors,
ReceiverGroup  receivers,
byte  interestGroup 
)
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.
sendReliableIf this event has to arrive reliably (potentially repeated if it's lost).
customEventContentAny serializable datatype (including Hashtable like the other OpRaiseEvent overloads).
channelIdCommand sequence in which this command belongs. Must be less than value of ChannelCount property. Default: 0.
cacheAffects how the server will treat the event caching-wise. Can cache events for players joining later on or remove previously cached events. Default: DoNotCache.
targetActorsList of ActorNumbers (in this room) to send the event to. Overrides caching. Default: null.
receiversDefines a target-player group. Default: Others.
interestGroupDefines to which interest group the event is sent. Players can subscribe or unsibscribe to groups. Group 0 is always sent to all. Default: 0.
Returns
If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
bool  sendReliable,
object  customEventContent,
byte  channelId,
EventCaching  cache,
int[]  targetActors,
ReceiverGroup  receivers,
byte  interestGroup,
bool  forwardToWebhook 
)
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.
sendReliableIf this event has to arrive reliably (potentially repeated if it's lost).
customEventContentAny serializable datatype (including Hashtable like the other OpRaiseEvent overloads).
channelIdCommand sequence in which this command belongs. Must be less than value of ChannelCount property. Default: 0.
cacheAffects how the server will treat the event caching-wise. Can cache events for players joining later on or remove previously cached events. Default: DoNotCache.
targetActorsList of ActorNumbers (in this room) to send the event to. Overrides caching. Default: null.
receiversDefines a target-player group. Default: Others.
interestGroupDefines to which interest group the event is sent. Players can subscribe or unsibscribe to groups. Group 0 is always sent to all. Default: 0.
forwardToWebhookTells the server to send this event to the "WebHook" configured for your Application in the Dashboard. Should only be used in Turnbased games.
Returns
If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
byte  interestGroup,
Hashtable  customEventContent,
bool  sendReliable 
)
inlinevirtual

Send your custom data as event to an "interest group" in the current Room.

No matter if reliable or not, when an event is sent to a interest Group, some users won't get this data. Clients can control the groups they are interested in by using OpChangeGroups.

Parameters
eventCodeIdentifies this type of event (and the content). Your game's event codes can start with 0.
interestGroupThe ID of the interest group this event goes to (exclusively).
customEventContentCustom data you want to send along (use null, if none).
sendReliableIf this event has to arrive reliably (potentially repeated if it's lost).
Returns
If operation could be enqueued for sending
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
Hashtable  evData,
bool  sendReliable,
byte  channelId 
)
inlinevirtual

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation. This is an async request will trigger a OnOperationResponse() call only in error-cases, because it's called many times per second and can hardly fail.

Parameters
eventCodeCode for this "type" of event (assign a code, "meaning" and content at will, starting at code 1).
evDataData to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliableUse false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelIdThe "channel" to which this event should belong. Per channel, the sequence is kept in order.
Returns
If the operation could be sent (has to be connected).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
Hashtable  evData,
bool  sendReliable,
byte  channelId,
int[]  targetActors 
)
inlinevirtual

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.

Parameters
eventCodeCode for this "type" of event (use a code per "meaning" or content).
evDataData to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliableUse false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelIdThe "channel" to which this event should belong. Per channel, the sequence is kept in order.
targetActorsDefines the target players who should receive the event (use only for small target groups).
Returns
If the operation could be sent (has to be connected).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
Hashtable  evData,
bool  sendReliable,
byte  channelId,
int[]  targetActors,
EventCaching  cache 
)
inlinevirtual

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.

Parameters
eventCodeCode for this "type" of event (use a code per "meaning" or content).
evDataData to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliableUse false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelIdThe "channel" to which this event should belong. Per channel, the sequence is kept in order.
targetActorsDefines the target players who should receive the event (use only for small target groups).
cacheUse EventCaching options to store this event for players who join.
Returns
If the operation could be sent (has to be connected).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
Hashtable  evData,
bool  sendReliable,
byte  channelId,
EventCaching  cache,
ReceiverGroup  receivers 
)
inlinevirtual

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.

Parameters
eventCodeCode for this "type" of event (use a code per "meaning" or content).
evDataData to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliableUse false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelIdThe "channel" to which this event should belong. Per channel, the sequence is kept in order.
cacheUse EventCaching options to store this event for players who join.
receiversReceiverGroup defines to which group of players the event is passed on.
Returns
If the operation could be sent (has to be connected).
virtual bool ExitGames.Client.Photon.LoadBalancing.LoadBalancingPeer.OpRaiseEvent ( byte  eventCode,
object  customEventContent,
bool  sendReliable,
RaiseEventOptions  raiseEventOptions 
)
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).
sendReliableIf this event has to arrive reliably (potentially repeated if it's lost).
raiseEventOptionsContains (slightly) less often used options. If you pass null, the default options will be used.
Returns
If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.

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