TeamTalk 5 .NET DLL
Version 5.14A
|
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... | |
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().
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.
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.
lpEncryptionContext | Encryption properties for peer verification. |
Definition at line 6438 of file TeamTalk.cs.
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.
szHostAddress | The IP-address or hostname of the server. |
nTcpPort | The host port of the server (TCP). |
nUdpPort | The audio/video port of the server (UDP). |
nLocalTcpPort | The local TCP port which should be used. Setting it to 0 makes OS select a port number (recommended). |
nLocalUdpPort | The local UDP port which should be used. Setting it to 0 makes OS select a port number (recommended). |
bEncrypted | Whether the server requires an encrypted connection. As of TeamTalk v5.5 and onwards encryption is available in both TeamTalk SDK Standard and Professional Edition. |
Definition at line 6471 of file TeamTalk.cs.
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.
szHostAddress | The IP-address or hostname of the server. |
nTcpPort | The host port of the server (TCP). |
nUdpPort | The audio/video port of the server (UDP). |
nLocalTcpPort | The local TCP port which should be used. Setting it to 0 makes OS select a port number (recommended). |
nLocalUdpPort | The local UDP port which should be used. Setting it to 0 makes OS select a port number (recommended). |
bEncrypted | Whether the server requires an encrypted connection. As of TeamTalk v5.5 and onwards encryption is available in both TeamTalk SDK Standard and Professional Edition. |
szSystemID | The identification of the conferencing system. The default value is "teamtalk". See TeamTalkSrvBase.StartServerSysID() |
Definition at line 6505 of file TeamTalk.cs.
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.
szHostAddress | The IP-address or hostname of the server. |
nTcpPort | The host port of the server (TCP). |
nUdpPort | The audio/video port of the server (UDP). |
szBindIPAddr | The IP-address to bind to on the local interface in dotted decimal format, e.g. 192.168.1.10. |
nLocalTcpPort | The local TCP port which should be used. Setting it to 0 makes OS select a port number (recommended). |
nLocalUdpPort | The local UDP port which should be used. Setting it to 0 makes OS select a port number (recommended). |
bEncrypted | Whether the server requires an encrypted connection. As of TeamTalk v5.5 and onwards encryption is available in both TeamTalk SDK Standard and Professional Edition. |
Definition at line 6538 of file TeamTalk.cs.
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.
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.
nUserID | The 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.
bool BearWare.TeamTalkBase.GetClientStatistics | ( | ref ClientStatistics | lpClientStatistics | ) |
Retrieve client statistics of bandwidth usage and response times.
Definition at line 6577 of file TeamTalk.cs.
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.
Definition at line 6596 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.GetClientKeepAlive | ( | ref ClientKeepAlive | lpClientKeepAlive | ) |
Get the client instance's current keep alive settings.
Definition at line 6607 of file TeamTalk.cs.