TeamTalk 5 .NET DLL  Version 5.14A
Client/Server Connectivity

This section explains how to connect to a server and how the client should transmit voice and video data. More...

Classes

struct  BearWare.EncryptionContext
 Configure peer verification for encrypted connection. More...
 
struct  BearWare.ClientKeepAlive
 Control timers for sending keep alive information to the server. More...
 
struct  BearWare.ClientStatistics
 Statistics of bandwidth usage and ping times in the local client instance. More...
 
struct  BearWare.JitterConfig
 Configuration parameters for the Jitter Buffer. More...
 

Functions

bool BearWare.TeamTalkBase.SetEncryptionContext (EncryptionContext lpEncryptionContext)
 Setup encryption properties prior to Connect(). More...
 
bool BearWare.TeamTalkBase.Connect (string szHostAddress, int nTcpPort, int nUdpPort, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted)
 Connect to a server. More...
 
bool BearWare.TeamTalkBase.ConnectSysID (string szHostAddress, int nTcpPort, int nUdpPort, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted, string szSystemID)
 Same as Connect() but the option of providing a unique system-ID. More...
 
bool BearWare.TeamTalkBase.ConnectEx (string szHostAddress, int nTcpPort, int nUdpPort, string szBindIPAddr, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted)
 Bind to specific IP-address prior to connecting to server. More...
 
bool BearWare.TeamTalkBase.Disconnect ()
 Disconnect from the server. More...
 
bool BearWare.TeamTalkBase.QueryMaxPayload (int nUserID)
 Query the maximum size of UDP data packets to the user or server. More...
 
bool BearWare.TeamTalkBase.GetClientStatistics (ref ClientStatistics lpClientStatistics)
 Retrieve client statistics of bandwidth usage and response times. More...
 
bool BearWare.TeamTalkBase.SetClientKeepAlive (ClientKeepAlive lpClientKeepAlive)
 Update the client instance's default keep alive settings. More...
 
bool BearWare.TeamTalkBase.GetClientKeepAlive (ref ClientKeepAlive lpClientKeepAlive)
 Get the client instance's current keep alive settings. More...
 

Detailed Description

This section explains how to connect to a server and how the client should transmit voice and video data.

To communicate with a server the TeamTalk client creates both a TCP and UDP connection to the server. Commands, i.e. the BearWare.TeamTalkBase.Do*-functions, are sent on TCP whereas audio and video are sent on UDP.

To connect to a server the user application must call TeamTalkBase.Connect(). Once connected the event TeamTalkBase.OnConnectSuccess() is posted to the user application and the TeamTalkBase.DoLogin() command can be issued. Always ensure to call TeamTalkBase.Disconnect() before attempting to create a new connection with TeamTalkBase.Connect().

When the client instance has joined a channel and wants to transmit audio or video data to other users this can be done by calling TeamTalkBase.EnableTransmission().

Forward Through Server Transmission Mode

The client instance is sending its audio and video packets to the server and the server will then broadcast the packets to the other users on behalf of the client. In other words the client puts the bandwidth load onto the server. This approach has its advantages and disadvantages. Since most internet users nowadays have limited upstream they cannot broadcast audio and video packets to numerous users at the same time, so therefore the TeamTalk client makes the server do the broadcasting. This means that the server must have sufficient bandwidth available to handle data transmission from and to all the connected users. One disadvantage by having the server forward the audio and video packets is that it doubles latency, since the client doesn't send directly to other clients.

If the server should not allow clients to forward audio and video packets the uUserRights member of BearWare.UserAccount must disable UserRight.USERRIGHT_TRANSMIT_VOICE and UserRight.USERRIGHT_TRANSMIT_VIDEOCAPTURE.

Function Documentation

◆ SetEncryptionContext()

bool BearWare.TeamTalkBase.SetEncryptionContext ( EncryptionContext  lpEncryptionContext)

Setup encryption properties prior to Connect().

If the server does peer verification then client must specify certificate file and private key file.

Do not set encryption context unless server requires clients to do so.

Parameters
lpEncryptionContextEncryption properties for peer verification.

Definition at line 6438 of file TeamTalk.cs.

◆ Connect()

bool BearWare.TeamTalkBase.Connect ( string  szHostAddress,
int  nTcpPort,
int  nUdpPort,
int  nLocalTcpPort,
int  nLocalUdpPort,
bool  bEncrypted 
)

Connect to a server.

This is a non-blocking call (but may block due to DNS lookup) so the user application must wait for the event OnConnectionSuccess to be posted once the connection has been established or OnConnectionFailed if connection could not be established. If the connection could not be establish ensure to call Disconnect to close open connections in the client instance before trying again.

Once connected call DoLogin to log on to the server.

Parameters
szHostAddressThe IP-address or hostname of the server.
nTcpPortThe host port of the server (TCP).
nUdpPortThe audio/video port of the server (UDP).
nLocalTcpPortThe local TCP port which should be used. Setting it to 0 makes OS select a port number (recommended).
nLocalUdpPortThe local UDP port which should be used. Setting it to 0 makes OS select a port number (recommended).
bEncryptedWhether the server requires an encrypted connection. As of TeamTalk v5.5 and onwards encryption is available in both TeamTalk SDK Standard and Professional Edition.
Returns
Returns TRUE if connection process was initiated.
See also
OnConnectionSuccess
OnConnectionFailed
TeamTalkBase.DoLogin

Definition at line 6471 of file TeamTalk.cs.

◆ ConnectSysID()

bool BearWare.TeamTalkBase.ConnectSysID ( string  szHostAddress,
int  nTcpPort,
int  nUdpPort,
int  nLocalTcpPort,
int  nLocalUdpPort,
bool  bEncrypted,
string  szSystemID 
)

Same as Connect() but the option of providing a unique system-ID.

The system-ID is set in the TeamTalk server API using TTS_StartServerSysID(). If a client tries to connect with a different system-ID that client will receive the error ClientError.CMDERR_INCOMPATIBLE_PROTOCOLS when trying to log in.

Parameters
szHostAddressThe IP-address or hostname of the server.
nTcpPortThe host port of the server (TCP).
nUdpPortThe audio/video port of the server (UDP).
nLocalTcpPortThe local TCP port which should be used. Setting it to 0 makes OS select a port number (recommended).
nLocalUdpPortThe local UDP port which should be used. Setting it to 0 makes OS select a port number (recommended).
bEncryptedWhether the server requires an encrypted connection. As of TeamTalk v5.5 and onwards encryption is available in both TeamTalk SDK Standard and Professional Edition.
szSystemIDThe identification of the conferencing system. The default value is "teamtalk". See TeamTalkSrvBase.StartServerSysID()
Returns
Returns TRUE if connection process was initiated.

Definition at line 6505 of file TeamTalk.cs.

◆ ConnectEx()

bool BearWare.TeamTalkBase.ConnectEx ( string  szHostAddress,
int  nTcpPort,
int  nUdpPort,
string  szBindIPAddr,
int  nLocalTcpPort,
int  nLocalUdpPort,
bool  bEncrypted 
)

Bind to specific IP-address prior to connecting to server.

Same as Connect() except that this also allows which IP-address to bind to on the local interface.

Parameters
szHostAddressThe IP-address or hostname of the server.
nTcpPortThe host port of the server (TCP).
nUdpPortThe audio/video port of the server (UDP).
szBindIPAddrThe IP-address to bind to on the local interface in dotted decimal format, e.g. 192.168.1.10.
nLocalTcpPortThe local TCP port which should be used. Setting it to 0 makes OS select a port number (recommended).
nLocalUdpPortThe local UDP port which should be used. Setting it to 0 makes OS select a port number (recommended).
bEncryptedWhether the server requires an encrypted connection. As of TeamTalk v5.5 and onwards encryption is available in both TeamTalk SDK Standard and Professional Edition.
See also
Connect

Definition at line 6538 of file TeamTalk.cs.

◆ Disconnect()

bool BearWare.TeamTalkBase.Disconnect ( )

Disconnect from the server.

This will clear the flag ClientFlag.CLIENT_CONNECTED and ClientFlag.CLIENT_CONNECTING.

Definition at line 6555 of file TeamTalk.cs.

◆ QueryMaxPayload()

bool BearWare.TeamTalkBase.QueryMaxPayload ( int  nUserID)

Query the maximum size of UDP data packets to the user or server.

The TeamTalkBase.OnConnectionMaxPayloadUpdated() event is posted when the query has finished.

Parameters
nUserIDThe ID of the user to query or 0 for querying server. Currently only nUserID = 0 is supported.

Definition at line 6568 of file TeamTalk.cs.

◆ GetClientStatistics()

bool BearWare.TeamTalkBase.GetClientStatistics ( ref ClientStatistics  lpClientStatistics)

Retrieve client statistics of bandwidth usage and response times.

See also
BearWare.ClientStatistics

Definition at line 6577 of file TeamTalk.cs.

◆ SetClientKeepAlive()

bool BearWare.TeamTalkBase.SetClientKeepAlive ( ClientKeepAlive  lpClientKeepAlive)

Update the client instance's default keep alive settings.

It is generally discouraged to change the client instance's keep alive settings unless the network has special requirements.

After calling SetClientKeepAlive() it is recommended doing a DoPing() since all TCP and UDP keep alive timers will be restarted.

See also
DoPing()
GetClientKeepAlive()
GetClientStatistics()

Definition at line 6596 of file TeamTalk.cs.

◆ GetClientKeepAlive()

bool BearWare.TeamTalkBase.GetClientKeepAlive ( ref ClientKeepAlive  lpClientKeepAlive)

Get the client instance's current keep alive settings.

See also
DoPing()
SetClientKeepAlive()
GetClientStatistics()

Definition at line 6607 of file TeamTalk.cs.