TeamTalk 5 .NET DLL Version 5.15A
|
Instantiate and run a TeamTalk server. More...
Classes | |
class | BearWare.TeamTalk5Srv |
Instantiate this class to start a TeamTalk server. More... | |
class | BearWare.TeamTalkSrvBase |
Base class for BearWare.TeamTalk5Srv. More... | |
Functions | |
BearWare.TeamTalk5Srv.TeamTalk5Srv () | |
Instantiate TeamTalk server. Call UpdateServer() and MakeChannel() to setup server properties and root channel. | |
BearWare.TeamTalk5Srv.TeamTalk5Srv (Channel lpChannel) | |
Instantiate TeamTalk server with a root channel. | |
BearWare.TeamTalk5Srv.TeamTalk5Srv (Channel lpChannel, ServerProperties lpServerProperties) | |
Instantiate TeamTalk server with root channel and server properties. | |
bool | BearWare.TeamTalkSrvBase.SetEncryptionContext (string szCertificateFile, string szPrivateKeyFile) |
Set certificate and private key for encrypted server. | |
bool | BearWare.TeamTalkSrvBase.SetEncryptionContext (EncryptionContext lpEncryptionContext) |
Set up encryption context for encrypted server. | |
BearWare.TeamTalkSrvBase.TeamTalkSrvBase () | |
Create new TeamTalk server instance. | |
BearWare.TeamTalkSrvBase.TeamTalkSrvBase (Channel lpChannel) | |
BearWare.TeamTalkSrvBase.TeamTalkSrvBase (Channel lpChannel, ServerProperties lpServerProperties) | |
void | BearWare.TeamTalkSrvBase.Close () |
Close TeamTalk server instance. | |
bool | BearWare.TeamTalkSrvBase.RunEventLoop (int pnWaitMs) |
Run the server's event loop. | |
ClientError | BearWare.TeamTalkSrvBase.SetChannelFilesRoot (string szFilesRoot, Int64 nMaxDiskUsage, Int64 nDefaultChannelQuota) |
The root folder of where users should upload files to. | |
ClientError | BearWare.TeamTalkSrvBase.UpdateServer ([In] BearWare.ServerProperties lpServerProperties) |
Set server properties. | |
virtual ClientError | BearWare.TeamTalkSrvBase.MakeChannel (BearWare.Channel lpChannel) |
Make new channel. | |
ClientError | BearWare.TeamTalkSrvBase.UpdateChannel (Channel lpChannel) |
Update an existing channel. | |
ClientError | BearWare.TeamTalkSrvBase.RemoveChannel (int nChannelID) |
Remove a channel. | |
ClientError | BearWare.TeamTalkSrvBase.AddFileToChannel (string szLocalFilePath, BearWare.RemoteFile lpRemoteFile) |
Add a file to an existing channel. | |
ClientError | BearWare.TeamTalkSrvBase.RemoveFileFromChannel (RemoteFile lpRemoteFile) |
Remove a file from a channel. | |
ClientError | BearWare.TeamTalkSrvBase.MoveUser (int nUserID, BearWare.Channel lpChannel) |
Move a user from one channel to another. | |
ClientError | BearWare.TeamTalkSrvBase.SendTextMessage (BearWare.TextMessage lpTextMessage) |
Send text message from server to clients. | |
bool | BearWare.TeamTalkSrvBase.StartServer (string szBindIPAddr, int nTcpPort, int nUdpPort, bool bEncrypted) |
Start server on specified IP-address and ports. | |
bool | BearWare.TeamTalkSrvBase.StartServerSysID (string szBindIPAddr, int nTcpPort, int nUdpPort, bool bEncrypted, string szSystemID) |
Same as StartServer() but with the option of specifying a system-ID. | |
bool | BearWare.TeamTalkSrvBase.StopServer () |
Stop server and drop all users. | |
static string | BearWare.TeamTalkSrvBase.GetVersion () |
BearWare.TeamTalkSrvBase.CallBack.CallBack (Delegate lpCallback) | |
IntPtr | BearWare.TeamTalkSrvBase.CallBack.GetFuncPointer () |
void | BearWare.TeamTalkSrvBase.CallBack.Dispose () |
void | BearWare.TeamTalkSrvBase.CallBack.Dispose (bool disposing) |
bool | BearWare.TeamTalkSrvBase.CallBack.Compare (Delegate x) |
Instantiate and run a TeamTalk server.
The Professional Edition of the TeamTalk SDK includes a class called BearWare.TeamTalk5Srv which exposes the TeamTalk server API.
To create a TeamTalk server instantiate the BearWare.TeamTalk5Srv class. If the server should be encrypted then call TeamTalk5Srv.SetEncryptionContext() prior to the instantiation, since the SSL context must be available before instantiation of the server.
Next configure the server instance by calling TeamTalk5Srv.UpdateServer(). Remember to set all properties of BearWare.ServerProperties. Also create a root channel by calling TeamTalk5Srv.MakeChannel(). If there is no root channel then the server will not start. Finally call TeamTalk5Srv.StartServer() to start the server. Now you must continuesly call TeamTalk5Srv.RunEventLoop() to run the server event loop.
The TeamTalk server API is able to do callbacks when users perform certain events. There are two types of callbacks, one is Server Notification Callbacks and the other is Server Request Callbacks where the server is asking the server application on what to return to the user (a BearWare.ClientErrorMsg is provided by the server API which will be returned to the user).
To see a simple example application of a TeamTalk server check out TeamTalk .NET Server Example (TeamTalkServer.NET).
BearWare.TeamTalk5Srv.TeamTalk5Srv | ( | ) |
Instantiate TeamTalk server. Call UpdateServer() and MakeChannel() to setup server properties and root channel.
Users cannot log in unless root channel and BearWare.ServerProperties have been set.
Definition at line 438 of file TeamTalkSrv.cs.
BearWare.TeamTalk5Srv.TeamTalk5Srv | ( | Channel | lpChannel | ) |
Instantiate TeamTalk server with a root channel.
Users cannot log in unless root channel and BearWare.ServerProperties have been set.
Definition at line 449 of file TeamTalkSrv.cs.
BearWare.TeamTalk5Srv.TeamTalk5Srv | ( | Channel | lpChannel, |
ServerProperties | lpServerProperties | ||
) |
Instantiate TeamTalk server with root channel and server properties.
Definition at line 460 of file TeamTalkSrv.cs.
bool BearWare.TeamTalkSrvBase.SetEncryptionContext | ( | string | szCertificateFile, |
string | szPrivateKeyFile | ||
) |
Set certificate and private key for encrypted server.
* NOTE: AT THE MOMENT CALL SetEncryptionContext() BEFORE * CREATING THE SERVER INSTANCE. IN OTHER WORDS ONLY ONE * ENCRYPTION CONTEXT IS SUPPORTED AT THE MOMENT. *
The encrypted server's certificate and private key must be set prior to starting the server using StartServer().
Look in TeamTalk Server Setup Guide on how to generate the certificate and private key file using OpenSSL.
szCertificateFile | Path to server's certificate file. |
szPrivateKeyFile | Path to server's private key file. |
Definition at line 78 of file TeamTalkSrvBase.cs.
bool BearWare.TeamTalkSrvBase.SetEncryptionContext | ( | EncryptionContext | lpEncryptionContext | ) |
Set up encryption context for encrypted server.
The encryption context for the server must be set prior to starting the server using StartServer().
Minimal requirements for the encryption context is to set certificate and private key.
Look in TeamTalk Server Setup Guide on how to generate the certificate and private key file using OpenSSL.
lpEncryptionContext | The encryption context for the server, i.e. server certificate, private key and optionally certificate authority. |
Definition at line 100 of file TeamTalkSrvBase.cs.
|
protected |
Create new TeamTalk server instance.
Once server instance is created call UpdateServer() to set the server's properties followed by MakeChannel() to create the root channel.
* NOTE: AT THE MOMENT CALL SetEncryptionContext() BEFORE * CREATING THE SERVER INSTANCE, TeamTalkSrvBase(). * IN OTHER WORDS ONLY ONE ENCRYPTION CONTEXT IS * SUPPORTED AT THE MOMENT. *
Definition at line 120 of file TeamTalkSrvBase.cs.
|
protected |
Definition at line 124 of file TeamTalkSrvBase.cs.
|
protected |
Definition at line 129 of file TeamTalkSrvBase.cs.
void BearWare.TeamTalkSrvBase.Close | ( | ) |
Close TeamTalk server instance.
Definition at line 138 of file TeamTalkSrvBase.cs.
bool BearWare.TeamTalkSrvBase.RunEventLoop | ( | int | pnWaitMs | ) |
Run the server's event loop.
pnWaitMs | The amount of time to wait for the event. If NULL or -1 the function will block forever or until the next event occurs. |
Definition at line 148 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.SetChannelFilesRoot | ( | string | szFilesRoot, |
Int64 | nMaxDiskUsage, | ||
Int64 | nDefaultChannelQuota | ||
) |
The root folder of where users should upload files to.
The root file folder cannot be changed after the server has been started.
Ensure to set BearWare.UserRight.USERRIGHT_UPLOAD_FILES and BearWare.UserRight.USERRIGHT_DOWNLOAD_FILES in user's BearWare.UserAccount.
szFilesRoot | Directory where to store uploaded files. |
nMaxDiskUsage | The maximum number of bytes which can be used for file storage. |
nDefaultChannelQuota | The number of bytes available to temporary channels (not BearWare.ChannelType.CHANNEL_PERMANENT). This will be the value in BearWare.Channel nDiskQuota . |
Definition at line 169 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.UpdateServer | ( | [In] BearWare::ServerProperties | lpServerProperties | ) |
Set server properties.
Set server's properties, like e.g. maximum number of users, server name, etc.
Server properties must be set prior to starting a server.
lpServerProperties | The server's properties which will be see by all users who log on to the server. |
Definition at line 186 of file TeamTalkSrvBase.cs.
|
virtual |
Make new channel.
Create a new channel on the server. Before starting a server using StartServer() the server MUST have a root channel. I.e. a BearWare.Channel where nParentID
is 0.
lpChannel | The new channel to create. |
Definition at line 202 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.UpdateChannel | ( | Channel | lpChannel | ) |
Update an existing channel.
lpChannel | The updated channel properties. nChannelID and nParentID must remain the same. |
Definition at line 215 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.RemoveChannel | ( | int | nChannelID | ) |
Remove a channel.
nChannelID | The ID of the channel to remove. |
Definition at line 227 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.AddFileToChannel | ( | string | szLocalFilePath, |
BearWare::RemoteFile | lpRemoteFile | ||
) |
Add a file to an existing channel.
Ensure to have set up file storage first using SetChannelFilesRoot(). Also ensure BearWare.Channel's nDiskQuota
is specified.
szLocalFilePath | Path to file. |
lpRemoteFile | Properties of file to add. |
Definition at line 243 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.RemoveFileFromChannel | ( | RemoteFile | lpRemoteFile | ) |
Remove a file from a channel.
Ensure to have set up file storage first using SetChannelFilesRoot(). Also ensure BearWare.Channel's nDiskQuota
is specified.
lpRemoteFile | Properties of file to remove. Channel ID and file name is enough. |
Definition at line 259 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.MoveUser | ( | int | nUserID, |
BearWare::Channel | lpChannel | ||
) |
Move a user from one channel to another.
nUserID | The ID of the user to move. |
lpChannel | The channel the user should move to. If the channel already exists then simply set nChannelID . To make a user leave a channel set nChannelID to 0. |
Definition at line 271 of file TeamTalkSrvBase.cs.
ClientError BearWare.TeamTalkSrvBase.SendTextMessage | ( | BearWare::TextMessage | lpTextMessage | ) |
Send text message from server to clients.
lpTextMessage | Text message to send. The message type determines how the message will be sent. |
Definition at line 283 of file TeamTalkSrvBase.cs.
bool BearWare.TeamTalkSrvBase.StartServer | ( | string | szBindIPAddr, |
int | nTcpPort, | ||
int | nUdpPort, | ||
bool | bEncrypted | ||
) |
Start server on specified IP-address and ports.
Before starting a server the root channel must be created using MakeChannel().
szBindIPAddr | The IP-address to bind to. |
nTcpPort | The TCP port to bind to. |
nUdpPort | The UDP port to bind to. |
bEncrypted | If encryption is enabled then encryption context must be set prior to this call using SetEncryptionContext(). |
Definition at line 301 of file TeamTalkSrvBase.cs.
bool BearWare.TeamTalkSrvBase.StartServerSysID | ( | string | szBindIPAddr, |
int | nTcpPort, | ||
int | nUdpPort, | ||
bool | bEncrypted, | ||
string | szSystemID | ||
) |
Same as StartServer() but with the option of specifying a system-ID.
Requires TeamTalk version 5.1.3.4506.
szBindIPAddr | The IP-address to bind to. |
nTcpPort | The TCP port to bind to. |
nUdpPort | The UDP port to bind to. |
bEncrypted | If encryption is enabled then encryption context must be set prior to this call using SetEncryptionContext(). |
szSystemID | The identification of the conferencing system. The default value is "teamtalk". See TeamTalkBase.ConnectSysID(). |
Definition at line 318 of file TeamTalkSrvBase.cs.
bool BearWare.TeamTalkSrvBase.StopServer | ( | ) |
Stop server and drop all users.
Definition at line 327 of file TeamTalkSrvBase.cs.
|
static |
Definition at line 332 of file TeamTalkSrvBase.cs.
BearWare.TeamTalkSrvBase.CallBack.CallBack | ( | Delegate | lpCallback | ) |
Definition at line 338 of file TeamTalkSrvBase.cs.
IntPtr BearWare.TeamTalkSrvBase.CallBack.GetFuncPointer | ( | ) |
Definition at line 351 of file TeamTalkSrvBase.cs.
void BearWare.TeamTalkSrvBase.CallBack.Dispose | ( | ) |
Definition at line 355 of file TeamTalkSrvBase.cs.
|
protected |
Definition at line 360 of file TeamTalkSrvBase.cs.
bool BearWare.TeamTalkSrvBase.CallBack.Compare | ( | Delegate | x | ) |
Definition at line 372 of file TeamTalkSrvBase.cs.