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
파일 보기 프로젝트 열기: unityosgt/source

공개 메소드들

메소드 설명
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