Photon Voice v2.53

Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
LoadBalancingTransport Class Reference

Extends LoadBalancingClient with media streaming functionality. More...

Inherits LoadBalancingClient, IVoiceTransport, ILogger, and IDisposable.

Inherited by LoadBalancingTransport2.

Public Member Functions

virtual int GetPayloadFragmentSize (SendFrameParams par)
 
void LogError (string fmt, params object[] args)
 
void LogWarning (string fmt, params object[] args)
 
void LogInfo (string fmt, params object[] args)
 
void LogDebug (string fmt, params object[] args)
 
bool IsChannelJoined (int channelId)
 
 LoadBalancingTransport (ILogger logger=null, ConnectionProtocol connectionProtocol=ConnectionProtocol.Udp, bool cppCompatibilityMode=false)
 Initializes a new LoadBalancingTransport. More...
 
new void Service ()
 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...
 
virtual bool ChangeAudioGroups (byte[] groupsToRemove, byte[] groupsToAdd)
 
void SendVoiceInfo (LocalVoice voice, int channelId, bool targetMe, int[] targetPlayers)
 
void SendVoiceRemove (LocalVoice voice, int channelId, bool targetMe, int[] targetPlayers)
 
void SendFrame (ArraySegment< byte > data, FrameFlags flags, byte evNumber, byte frNumber, byte voiceId, int channelId, SendFrameParams par)
 
string ChannelIdStr (int channelId)
 
string PlayerIdStr (int playerId)
 
void Dispose ()
 Releases all resources used by the LoadBalancingTransport instance. More...
 

Protected Member Functions

virtual object buildFrameMessage (byte voiceId, byte evNumber, byte frNumber, ArraySegment< byte > data, FrameFlags flags)
 
virtual void onEventActionVoiceClient (EventData ev)
 

Protected Attributes

VoiceClient voiceClient
 
readonly bool cppCompatibilityMode
 
virtual byte FrameCode => VoiceEvent.Code
 

Properties

VoiceClient VoiceClient [get]
 The VoiceClient implementation associated with this LoadBalancingTransport. More...
 

Detailed Description

Extends LoadBalancingClient with media streaming functionality.

Use your normal LoadBalancing workflow to join a Voice room. All standard LoadBalancing features are available. Use VoiceClient to work with media streams.

Constructor & Destructor Documentation

◆ LoadBalancingTransport()

LoadBalancingTransport ( ILogger  logger = null,
ConnectionProtocol  connectionProtocol = ConnectionProtocol.Udp,
bool  cppCompatibilityMode = false 
)

Initializes a new LoadBalancingTransport.

Parameters
loggerILogger instance. If null, this instance LoadBalancingClient.DebugReturn implementation is used.ConnectionProtocol
connectionProtocolConnection protocol (UDP or TCP). ConnectionProtocol
cppCompatibilityModeUse a protocol compatible with Voice C++ API.

Member Function Documentation

◆ Dispose()

void Dispose ( )

Releases all resources used by the LoadBalancingTransport instance.

◆ Service()

new void Service ( )

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).

Property Documentation

◆ VoiceClient

The VoiceClient implementation associated with this LoadBalancingTransport.