C# Class LoadbalancingPeer, source

A LoadbalancingPeer provides the operations and enum definitions needed to use the loadbalancing server app(s).
The LoadBalancingPeer does not keep a state, instead this is done by a LoadBalancingClient.
Inheritance: PhotonPeer
Afficher le fichier Open project: unityosgt/source

Méthodes publiques

Méthode Description
LoadbalancingPeer ( IPhotonPeerListener listener, ConnectionProtocol protocolType ) : System
OpAuthenticate ( string appId, string appVersion ) : bool

Sends this app's appId and appVersion to identify this application server side.

This operation makes use of encryption, if it's established beforehand. See: EstablishEncryption(). Check encryption with IsEncryptionAvailable.

OpCreateRoom ( string gameID, bool isVisible, bool isOpen, byte maxPlayers, bool autoCleanUp, Hashtable customGameProperties, Hashtable customPlayerProperties, string customRoomPropertiesForLobby ) : bool

Don't use this method directly, unless you know how to cache and apply customActorProperties. The PhotonNetwork methods will handle player and room properties for you and call this method.

OpJoinLobby ( ) : bool

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.

OpJoinRandomRoom ( Hashtable expectedGameProperties ) : bool the hashtable is (optionally) used to filter games: only those that fit the contained custom properties will be matched
OpJoinRoom ( string roomName, Hashtable playerProperties ) : bool

Joins a room by name and sets this player's properties.

OpLeaveLobby ( ) : bool

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

OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId ) : bool

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

OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId, EventCaching cache, ReceiverGroup receivers ) : bool

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

OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId, int targetActors ) : bool

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

OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId, int targetActors, EventCaching cache ) : bool

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

OpSetCustomPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
OpSetCustomPropertiesOfRoom ( Hashtable gameProperties, bool broadcast, byte channelId ) : bool
OpSetPropertiesOfRoom ( Hashtable gameProperties, bool broadcast, byte channelId ) : bool

Méthodes protégées

Méthode Description
OpSetPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
OpSetPropertyOfRoom ( byte propCode, object value ) : void

Method Details

LoadbalancingPeer() public méthode

public LoadbalancingPeer ( IPhotonPeerListener listener, ConnectionProtocol protocolType ) : System
listener IPhotonPeerListener
protocolType ConnectionProtocol
Résultat System

OpAuthenticate() public méthode

Sends this app's appId and appVersion to identify this application server side.
This operation makes use of encryption, if it's established beforehand. See: EstablishEncryption(). Check encryption with IsEncryptionAvailable.
public OpAuthenticate ( string appId, string appVersion ) : bool
appId string
appVersion string
Résultat bool

OpCreateRoom() public méthode

Don't use this method directly, unless you know how to cache and apply customActorProperties. The PhotonNetwork methods will handle player and room properties for you and call this method.
public OpCreateRoom ( string gameID, bool isVisible, bool isOpen, byte maxPlayers, bool autoCleanUp, Hashtable customGameProperties, Hashtable customPlayerProperties, string customRoomPropertiesForLobby ) : bool
gameID string
isVisible bool
isOpen bool
maxPlayers byte
autoCleanUp bool
customGameProperties Hashtable
customPlayerProperties Hashtable
customRoomPropertiesForLobby string
Résultat bool

OpJoinLobby() public méthode

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.
public OpJoinLobby ( ) : bool
Résultat bool

OpJoinRandomRoom() public méthode

the hashtable is (optionally) used to filter games: only those that fit the contained custom properties will be matched
public OpJoinRandomRoom ( Hashtable expectedGameProperties ) : bool
expectedGameProperties Hashtable
Résultat bool

OpJoinRoom() public méthode

Joins a room by name and sets this player's properties.
public OpJoinRoom ( string roomName, Hashtable playerProperties ) : bool
roomName string
playerProperties Hashtable
Résultat bool

OpLeaveLobby() public méthode

Leaves the lobby on the Master Server. This is an async request which triggers a OnOperationResponse() call.
public OpLeaveLobby ( ) : bool
Résultat bool

OpRaiseEvent() public méthode

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.
public OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId ) : bool
eventCode byte Code for this "type" of event (use a code per "meaning" or content).
evData Hashtable Data to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliable bool Use false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelId byte The "channel" to which this event should belong. Per channel, the sequence is kept in order.
Résultat bool

OpRaiseEvent() public méthode

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.
public OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId, EventCaching cache, ReceiverGroup receivers ) : bool
eventCode byte Code for this "type" of event (use a code per "meaning" or content).
evData Hashtable Data to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliable bool Use false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelId byte The "channel" to which this event should belong. Per channel, the sequence is kept in order.
cache EventCaching Use EventCaching options to store this event for players who join.
receivers ReceiverGroup ReceiverGroup defines to which group of players the event is passed on.
Résultat bool

OpRaiseEvent() public méthode

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.
public OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId, int targetActors ) : bool
eventCode byte Code for this "type" of event (use a code per "meaning" or content).
evData Hashtable Data to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliable bool Use false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelId byte The "channel" to which this event should belong. Per channel, the sequence is kept in order.
targetActors int Defines the target players who should receive the event (use only for small target groups).
Résultat bool

OpRaiseEvent() public méthode

Used in a room to raise (send) an event to the other players. Multiple overloads expose different parameters to this frequently used operation.
public OpRaiseEvent ( byte eventCode, Hashtable evData, bool sendReliable, byte channelId, int targetActors, EventCaching cache ) : bool
eventCode byte Code for this "type" of event (use a code per "meaning" or content).
evData Hashtable Data to send. Hashtable that contains key-values of Photon serializable datatypes.
sendReliable bool Use false if the event is replaced by a newer rapidly. Reliable events add overhead and add lag when repeated.
channelId byte The "channel" to which this event should belong. Per channel, the sequence is kept in order.
targetActors int Defines the target players who should receive the event (use only for small target groups).
cache EventCaching Use EventCaching options to store this event for players who join.
Résultat bool

OpSetCustomPropertiesOfActor() public méthode

public OpSetCustomPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
actorNr int
actorProperties Hashtable
broadcast bool
channelId byte
Résultat bool

OpSetCustomPropertiesOfRoom() public méthode

public OpSetCustomPropertiesOfRoom ( Hashtable gameProperties, bool broadcast, byte channelId ) : bool
gameProperties Hashtable
broadcast bool
channelId byte
Résultat bool

OpSetPropertiesOfActor() protected méthode

protected OpSetPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
actorNr int
actorProperties Hashtable
broadcast bool
channelId byte
Résultat bool

OpSetPropertiesOfRoom() public méthode

public OpSetPropertiesOfRoom ( Hashtable gameProperties, bool broadcast, byte channelId ) : bool
gameProperties Hashtable
broadcast bool
channelId byte
Résultat bool

OpSetPropertyOfRoom() protected méthode

protected OpSetPropertyOfRoom ( byte propCode, object value ) : void
propCode byte
value object
Résultat void