C# Класс 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.
Наследование: PhotonPeer
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
OpSetPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
OpSetPropertyOfRoom ( byte propCode, object value ) : void

Описание методов

LoadbalancingPeer() публичный Метод

public LoadbalancingPeer ( IPhotonPeerListener listener, ConnectionProtocol protocolType ) : System
listener IPhotonPeerListener
protocolType ConnectionProtocol
Результат System

OpAuthenticate() публичный Метод

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
Результат bool

OpCreateRoom() публичный Метод

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
Результат bool

OpJoinLobby() публичный Метод

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
Результат bool

OpJoinRandomRoom() публичный Метод

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
Результат bool

OpJoinRoom() публичный Метод

Joins a room by name and sets this player's properties.
public OpJoinRoom ( string roomName, Hashtable playerProperties ) : bool
roomName string
playerProperties Hashtable
Результат bool

OpLeaveLobby() публичный Метод

Leaves the lobby on the Master Server. This is an async request which triggers a OnOperationResponse() call.
public OpLeaveLobby ( ) : bool
Результат bool

OpRaiseEvent() публичный Метод

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.
Результат bool

OpRaiseEvent() публичный Метод

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.
Результат bool

OpRaiseEvent() публичный Метод

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).
Результат bool

OpRaiseEvent() публичный Метод

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.
Результат bool

OpSetCustomPropertiesOfActor() публичный Метод

public OpSetCustomPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
actorNr int
actorProperties Hashtable
broadcast bool
channelId byte
Результат bool

OpSetCustomPropertiesOfRoom() публичный Метод

public OpSetCustomPropertiesOfRoom ( Hashtable gameProperties, bool broadcast, byte channelId ) : bool
gameProperties Hashtable
broadcast bool
channelId byte
Результат bool

OpSetPropertiesOfActor() защищенный Метод

protected OpSetPropertiesOfActor ( int actorNr, Hashtable actorProperties, bool broadcast, byte channelId ) : bool
actorNr int
actorProperties Hashtable
broadcast bool
channelId byte
Результат bool

OpSetPropertiesOfRoom() публичный Метод

public OpSetPropertiesOfRoom ( Hashtable gameProperties, bool broadcast, byte channelId ) : bool
gameProperties Hashtable
broadcast bool
channelId byte
Результат bool

OpSetPropertyOfRoom() защищенный Метод

protected OpSetPropertyOfRoom ( byte propCode, object value ) : void
propCode byte
value object
Результат void