Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
ClientConstructOptions (nByte connectionProtocol=Photon::ConnectionProtocol::DEFAULT, bool autoLobbyStats=false, nByte regionSelectionMode=RegionSelectionMode::DEFAULT, bool useAlternativePorts=false, nByte serializationProtocol=Common::SerializationProtocol::DEFAULT) | |
~ClientConstructOptions (void) | |
ClientConstructOptions (const ClientConstructOptions &toCopy) | |
ClientConstructOptions & | operator= (const ClientConstructOptions &toCopy) |
nByte | getConnectionProtocol (void) const |
ClientConstructOptions & | setConnectionProtocol (nByte connectionProtocol) |
bool | getAutoLobbyStats (void) const |
ClientConstructOptions & | setAutoLobbyStats (bool autoLobbyStats) |
nByte | getRegionSelectionMode (void) const |
ClientConstructOptions & | setRegionSelectionMode (nByte regionSelectionMode) |
bool | getUseAlternativePorts (void) const |
ClientConstructOptions & | setUseAlternativePorts (bool useAlternativePorts) |
nByte | getSerializationProtocol (void) const |
ClientConstructOptions & | setSerializationProtocol (nByte serializationProtocol) |
virtual Common::JString & | toString (Common::JString &retStr, bool withTypes=false) const |
virtual JString & | toString (JString &retStr, bool withTypes=false) const=0 |
JString | toString (bool withTypes=false) const |
Public Member Functions inherited from ToString | |
virtual | ~ToString (void) |
virtual JString | typeToString (void) const |
JString | toString (bool withTypes=false) const |
This class aggregates the various optional parameters that can be passed to the constructor of class Client.
ClientConstructOptions | ( | nByte | connectionProtocol = Photon::ConnectionProtocol::DEFAULT , |
bool | autoLobbyStats = false , |
||
nByte | regionSelectionMode = RegionSelectionMode::DEFAULT , |
||
bool | useAlternativePorts = false , |
||
nByte | serializationProtocol = Common::SerializationProtocol::DEFAULT |
||
) |
Constructor: Creates a new instance with the specified parameters.
connectionProtocol | The protocol to use to connect to the Photon servers. Must match one of the constants specified in ConnectionProtocol. |
autoLobbyStats | Pass true, if you want to automatically receive updates for the lobby stats, false otherwise. Call opLobbyStats() to explicitly request a lobby stats update. |
regionSelectionMode | Determines how the Photon Cloud Region to which the Client connects should be selected. Must match one of the constants specified in RegionSelectionMode. This parameter gets ignored when connecting to Photon Server. |
useAlternativePorts | Determines if the the standard or the alternative port range should be used. This parameter currently is only relevant when ConnectionProtocol::UDP is passed for parameter connectionProtocol and gets ignored otherwise. A router or firewall might block connections that use one port-range but don't block connections that use the other, so when connecting with one range fails, then you may want to try with the other one. |
serializationProtocol | The protocol to use for serialization an deserialization of data. Must match one of the constants specified in SerializationProtocol. |
~ClientConstructOptions | ( | void | ) |
Destructor.
ClientConstructOptions | ( | const ClientConstructOptions & | toCopy | ) |
Copy-Constructor: Creates a new instance that is a deep copy of the argument instance.
toCopy | The instance to copy. |
ClientConstructOptions & operator= | ( | const ClientConstructOptions & | toCopy | ) |
operator=.
Makes a deep copy of its right operand into its left operand.
This overwrites old data in the left operand.
nByte getConnectionProtocol | ( | void | ) | const |
ClientConstructOptions & setConnectionProtocol | ( | nByte | connectionProtocol | ) |
Sets the ConnectionProtocol.
connectionProtocol | The protocol to use to connect to the Photon servers. Must match one of the constants specified in ConnectionProtocol. |
bool getAutoLobbyStats | ( | void | ) | const |
ClientConstructOptions & setAutoLobbyStats | ( | bool | autoLobbyStats | ) |
Sets the value of the autoLobbyStats flag.
autoLobbyStats | Pass true, if you want to automatically receive updates for the lobby stats, false otherwise. Call opLobbyStats() to explicitly request a lobby stats update. |
nByte getRegionSelectionMode | ( | void | ) | const |
ClientConstructOptions & setRegionSelectionMode | ( | nByte | regionSelectionMode | ) |
Sets the RegionSelectionMode.
regionSelectionMode | Determines how the Photon Cloud Region to which the Client connects should be selected. Must match one of the constants specified in RegionSelectionMode. |
bool getUseAlternativePorts | ( | void | ) | const |
ClientConstructOptions & setUseAlternativePorts | ( | bool | useAlternativePorts | ) |
Sets the value of the useAlternativePorts flag.
useAlternativePorts | Determines if the the standard or the alternative port range should be used. This parameter currently is only relevant when ConnectionProtocol::UDP is passed for parameter connectionProtocol and gets ignored otherwise. A router or firewall might block connections that use one port-range but don't block connections that use the other, so when connecting with one range fails, then you may want to try with the other one. |
nByte getSerializationProtocol | ( | void | ) | const |
ClientConstructOptions & setSerializationProtocol | ( | nByte | serializationProtocol | ) |
Sets the SerializationProtocol.
serializationProtocol | The protocol to use for serialization an deserialization of data. Must match one of the constants specified in SerializationProtocol. |
|
virtual |
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
Implements ToString.
toString |
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
JString toString |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
withTypes | set to true, to include type information in the generated string |