Photon C++ Client API  5.0.7.3
Classes | Public Member Functions | List of all members
LoadBalancingTransport Class Reference

Provides transport for VoiceClient based on given LoadBalancing Client Creates and maintains VoiceClient More...

Inheritance diagram for LoadBalancingTransport:
Inheritance graph
[legend]
Collaboration diagram for LoadBalancingTransport:
Collaboration graph
[legend]

Public Member Functions

 LoadBalancingTransport (LoadBalancing::Client &lbClient, Common::BaseListener &debugReturn, bool direct=false)
 
virtual void logError (const Common::JString &msg) const
 
virtual void logWarning (const Common::JString &msg) const
 
virtual void logInfo (const Common::JString &msg) const
 
virtual void logDebug (const Common::JString &msg) const
 
virtual bool isChannelJoined (int channelId)
 
virtual void sendVoicesInfo (const Common::JVector< const LocalVoice * > &voices, int channelId, int targetPlayerId)
 
virtual void sendVoiceRemove (const LocalVoice &voice, int channelId, int targetPlayerId)
 
virtual void sendFrame (Buffer< nByte > data, nByte evNumber, nByte voiceId, int channelId, const LocalVoice &localVoice)
 
virtual Common::JString channelIdStr (int channelId)
 
virtual Common::JString playerIdStr (int playerId)
 
virtual void setDebugEchoMode (const LocalVoice &voice)
 
nByte getGlobalInterestGroup (void) const
 Set global audio group for this client. This call sets InterestGroup for existing local voices and for created later to given value. Client set as listening to this group only until LoadBalancingPeer.OpChangeGroups() called. This method can be called any time. More...
 
void setGlobalInterestGroup (nByte)
 
void service (void)
 This method dispatches all available incoming commands and then sends this client's outgoing commands. Call this method regularly (2 to 20 times a second). More...
 
void onCustomEvent (int playerNr, nByte eventCode, const Common::Object &eventContent)
 
void onDirectMessage (const Common::Object &msg, int playerNr, bool relay)
 
void onJoinRoom (void)
 
void onLeaveRoom (void)
 
void onPlayerJoinRoom (int playerNr)
 
void onPlayerLeaveRoom (int playerNr)
 
virtual Common::JStringtoString (Common::JString &retStr, bool withTypes=false) const
 
virtual JStringtoString (JString &retStr, bool withTypes=false) const=0
 
JString toString (bool withTypes=false) const
 
- Public Member Functions inherited from LoggingBase< LoadBalancingTransport >
virtual ~LoggingBase (void)=0
 
- Public Member Functions inherited from ToString
virtual ~ToString (void)
 
virtual JString typeToString (void) const
 
JString toString (bool withTypes=false) const
 

Additional Inherited Members

- Static Public Member Functions inherited from LoggingBase< LoadBalancingTransport >
static void setListener (const BaseListener *pBaseListener)
 
static int getDebugOutputLevel (void)
 
static bool setDebugOutputLevel (int debugLevel)
 
static const LogFormatOptionsgetLogFormatOptions (void)
 
static void setLogFormatOptions (const LogFormatOptions &options)
 

Detailed Description

Provides transport for VoiceClient based on given LoadBalancing Client Creates and maintains VoiceClient

Member Function Documentation

◆ getGlobalInterestGroup()

nByte getGlobalInterestGroup ( void  ) const

Set global audio group for this client. This call sets InterestGroup for existing local voices and for created later to given value. Client set as listening to this group only until LoadBalancingPeer.OpChangeGroups() called. This method can be called any time.

LocalVoice.InterestGroup LoadBalancingPeer.OpChangeGroups(byte[], byte[])

◆ service()

void service ( void  )

This method dispatches all available incoming commands and then sends this client's outgoing commands. Call this method regularly (2 to 20 times a second).

◆ toString() [1/3]

JString & toString ( Common::JString retStr,
bool  withTypes = false 
) const
virtual
Remarks
The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
Parameters
retStrreference 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
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.

Implements ToString.

◆ toString() [2/3]

toString
Remarks
The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
Parameters
retStrreference 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
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.

◆ toString() [3/3]

JString toString

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
withTypesset to true, to include type information in the generated string
Returns
a JString representation of the instance and its contents for debugging purposes.
See also
JString