added creation of server info protocol message, some cleanup
This commit is contained in:
parent
c8731e6be6
commit
81b310713d
4 changed files with 250 additions and 66 deletions
164
src/protocol.cpp
164
src/protocol.cpp
|
@ -123,13 +123,16 @@ MESSAGES
|
||||||
|
|
||||||
- "base netw size": length of the base network packet (frame) in bytes
|
- "base netw size": length of the base network packet (frame) in bytes
|
||||||
- "block size fact": block size factor
|
- "block size fact": block size factor
|
||||||
- "num chan": number of channels of the audio signal, e.g. "2" is stereo
|
- "num chan": number of channels of the audio signal, e.g. "2" is
|
||||||
|
stereo
|
||||||
- "sam rate": sample rate of the audio stream
|
- "sam rate": sample rate of the audio stream
|
||||||
- "audiocod type": audio coding type, the following types are supported:
|
- "audiocod type": audio coding type, the following types are supported:
|
||||||
- 0: none, no audio coding applied
|
- 0: none, no audio coding applied
|
||||||
- 1: CELT
|
- 1: CELT
|
||||||
- "version": version of the audio coder, if not used this value shall be set to 0
|
- "version": version of the audio coder, if not used this value
|
||||||
- "audiocod arg": argument for the audio coder, if not used this value shall be set to 0
|
shall be set to 0
|
||||||
|
- "audiocod arg": argument for the audio coder, if not used this value
|
||||||
|
shall be set to 0
|
||||||
|
|
||||||
|
|
||||||
- PROTMESSID_REQ_NETW_TRANSPORT_PROPS: Request properties for network transport
|
- PROTMESSID_REQ_NETW_TRANSPORT_PROPS: Request properties for network transport
|
||||||
|
@ -146,7 +149,8 @@ MESSAGES
|
||||||
CONNECTION LESS MESSAGES
|
CONNECTION LESS MESSAGES
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
- PROTMESSID_CLM_PING_MS: Connection less ping message (for measuring the ping time)
|
- PROTMESSID_CLM_PING_MS: Connection less ping message (for measuring the ping
|
||||||
|
time)
|
||||||
|
|
||||||
note: same definition as PROTMESSID_PING_MS
|
note: same definition as PROTMESSID_PING_MS
|
||||||
|
|
||||||
|
@ -156,6 +160,35 @@ CONNECTION LESS MESSAGES
|
||||||
note: does not have any data -> n = 0
|
note: does not have any data -> n = 0
|
||||||
|
|
||||||
|
|
||||||
|
- PROTMESSID_CLM_REGISTER_SERVER: Register a server, providing server
|
||||||
|
information
|
||||||
|
|
||||||
|
+------------------+----------------------------------+ ...
|
||||||
|
| 2 bytes number n | n bytes UTF-8 string server name | ...
|
||||||
|
+------------------+----------------------------------+ ...
|
||||||
|
... -----------------+----------------------------+ ...
|
||||||
|
... 2 bytes number n | n bytes UTF-8 string topic | ...
|
||||||
|
... -----------------+----------------------------+ ...
|
||||||
|
... ----------------+------------------+---------------------------+ ...
|
||||||
|
... 2 bytes country | 2 bytes number n | n bytes UTF-8 string city | ...
|
||||||
|
... ----------------+------------------+---------------------------+ ...
|
||||||
|
... --------------------------------+ ...
|
||||||
|
... 1 byte number connected clients | ...
|
||||||
|
... --------------------------------+ ...
|
||||||
|
... ---------------------------------+---------------------+
|
||||||
|
... 1 byte maximum connected clients | 1 byte is permanent |
|
||||||
|
... ---------------------------------+---------------------+
|
||||||
|
|
||||||
|
- "country" is according to "Common Locale Data Repository" which is used in
|
||||||
|
the QLocale class
|
||||||
|
- "connected clients" is the current number of connected clients
|
||||||
|
- "maximum connected clients" is the maximum number of clients which can
|
||||||
|
be connected to the server at the same time
|
||||||
|
- "is permanent" is a flag which indicates if the server is permanent
|
||||||
|
online or not. If this value is any value <> 0 indicates that the server
|
||||||
|
is permanent online.
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
@ -553,7 +586,7 @@ bool CProtocol::ParseConnectionLessMessage ( const CVector<uint8_t>& vecbyData,
|
||||||
void CProtocol::CreateJitBufMes ( const int iJitBufSize )
|
void CProtocol::CreateJitBufMes ( const int iJitBufSize )
|
||||||
{
|
{
|
||||||
CVector<uint8_t> vecData ( 2 ); // 2 bytes of data
|
CVector<uint8_t> vecData ( 2 ); // 2 bytes of data
|
||||||
unsigned int iPos = 0; // init position pointer
|
unsigned int iPos = 0; // init position pointer
|
||||||
|
|
||||||
// build data vector
|
// build data vector
|
||||||
PutValOnStream ( vecData, iPos, static_cast<uint32_t> ( iJitBufSize ), 2 );
|
PutValOnStream ( vecData, iPos, static_cast<uint32_t> ( iJitBufSize ), 2 );
|
||||||
|
@ -604,7 +637,7 @@ bool CProtocol::EvaluateReqJitBufMes()
|
||||||
void CProtocol::CreateChanGainMes ( const int iChanID, const double dGain )
|
void CProtocol::CreateChanGainMes ( const int iChanID, const double dGain )
|
||||||
{
|
{
|
||||||
CVector<uint8_t> vecData ( 3 ); // 3 bytes of data
|
CVector<uint8_t> vecData ( 3 ); // 3 bytes of data
|
||||||
unsigned int iPos = 0; // init position pointer
|
unsigned int iPos = 0; // init position pointer
|
||||||
|
|
||||||
// build data vector
|
// build data vector
|
||||||
// channel ID
|
// channel ID
|
||||||
|
@ -612,6 +645,7 @@ void CProtocol::CreateChanGainMes ( const int iChanID, const double dGain )
|
||||||
|
|
||||||
// actual gain, we convert from double with range 0..1 to integer
|
// actual gain, we convert from double with range 0..1 to integer
|
||||||
const int iCurGain = static_cast<int> ( dGain * ( 1 << 15 ) );
|
const int iCurGain = static_cast<int> ( dGain * ( 1 << 15 ) );
|
||||||
|
|
||||||
PutValOnStream ( vecData, iPos, static_cast<uint32_t> ( iCurGain ), 2 );
|
PutValOnStream ( vecData, iPos, static_cast<uint32_t> ( iCurGain ), 2 );
|
||||||
|
|
||||||
CreateAndSendMessage ( PROTMESSID_CHANNEL_GAIN, vecData );
|
CreateAndSendMessage ( PROTMESSID_CHANNEL_GAIN, vecData );
|
||||||
|
@ -752,8 +786,8 @@ bool CProtocol::EvaluateReqConnClientsList()
|
||||||
|
|
||||||
void CProtocol::CreateChanNameMes ( const QString strName )
|
void CProtocol::CreateChanNameMes ( const QString strName )
|
||||||
{
|
{
|
||||||
unsigned int iPos = 0; // init position pointer
|
unsigned int iPos = 0; // init position pointer
|
||||||
const int iStrLen = strName.size(); // get string size
|
const int iStrLen = strName.size(); // get string size
|
||||||
|
|
||||||
// size of current list entry
|
// size of current list entry
|
||||||
const int iEntrLen = 2 /* string size */ + iStrLen;
|
const int iEntrLen = 2 /* string size */ + iStrLen;
|
||||||
|
@ -825,8 +859,8 @@ bool CProtocol::EvaluateReqChanNameMes()
|
||||||
|
|
||||||
void CProtocol::CreateChatTextMes ( const QString strChatText )
|
void CProtocol::CreateChatTextMes ( const QString strChatText )
|
||||||
{
|
{
|
||||||
unsigned int iPos = 0; // init position pointer
|
unsigned int iPos = 0; // init position pointer
|
||||||
const int iStrLen = strChatText.size(); // get string size
|
const int iStrLen = strChatText.size(); // get string size
|
||||||
|
|
||||||
// size of message body
|
// size of message body
|
||||||
const int iEntrLen = 2 /* string size */ + iStrLen;
|
const int iEntrLen = 2 /* string size */ + iStrLen;
|
||||||
|
@ -917,9 +951,14 @@ void CProtocol::CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrPr
|
||||||
unsigned int iPos = 0; // init position pointer
|
unsigned int iPos = 0; // init position pointer
|
||||||
|
|
||||||
// size of current message body
|
// size of current message body
|
||||||
const int iEntrLen = 4 /* netw size */ + 2 /* block size fact */ +
|
const int iEntrLen =
|
||||||
1 /* num chan */ + 4 /* sam rate */ + 2 /* audiocod type */ +
|
4 /* netw size */ +
|
||||||
2 /* version */ + 4 /* audiocod arg */;
|
2 /* block size fact */ +
|
||||||
|
1 /* num chan */ +
|
||||||
|
4 /* sam rate */ +
|
||||||
|
2 /* audiocod type */ +
|
||||||
|
2 /* version */ +
|
||||||
|
4 /* audiocod arg */;
|
||||||
|
|
||||||
// build data vector
|
// build data vector
|
||||||
CVector<uint8_t> vecData ( iEntrLen );
|
CVector<uint8_t> vecData ( iEntrLen );
|
||||||
|
@ -961,9 +1000,14 @@ bool CProtocol::EvaluateNetwTranspPropsMes ( const CVector<uint8_t>& vecData )
|
||||||
CNetworkTransportProps ReceivedNetwTranspProps;
|
CNetworkTransportProps ReceivedNetwTranspProps;
|
||||||
|
|
||||||
// size of current message body
|
// size of current message body
|
||||||
const int iEntrLen = 4 /* netw size */ + 2 /* block size fact */ +
|
const int iEntrLen =
|
||||||
1 /* num chan */ + 4 /* sam rate */ + 2 /* audiocod type */ +
|
4 /* netw size */ +
|
||||||
2 /* version */ + 4 /* audiocod arg */;
|
2 /* block size fact */ +
|
||||||
|
1 /* num chan */ +
|
||||||
|
4 /* sam rate */ +
|
||||||
|
2 /* audiocod type */ +
|
||||||
|
2 /* version */ +
|
||||||
|
4 /* audiocod arg */;
|
||||||
|
|
||||||
// check size
|
// check size
|
||||||
if ( vecData.Size() != iEntrLen )
|
if ( vecData.Size() != iEntrLen )
|
||||||
|
@ -1127,6 +1171,94 @@ bool CProtocol::EvaluateCLServerFullMes()
|
||||||
return false; // no error
|
return false; // no error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CProtocol::CreateCLRegisterServerMes ( const CHostAddress& InetAddr,
|
||||||
|
const CServerInfo& ServerInfo )
|
||||||
|
{
|
||||||
|
unsigned int iPos = 0; // init position pointer
|
||||||
|
|
||||||
|
// current string sizes
|
||||||
|
const int iNameLen = ServerInfo.strName.size();
|
||||||
|
const int iTopicLen = ServerInfo.strTopic.size();
|
||||||
|
const int iCityLen = ServerInfo.strCity.size();
|
||||||
|
|
||||||
|
// size of current message body
|
||||||
|
const int iEntrLen =
|
||||||
|
2 /* name string size */ + iNameLen +
|
||||||
|
2 /* topic string size */ + iTopicLen +
|
||||||
|
2 /* country */ +
|
||||||
|
2 /* city string size */ + iCityLen +
|
||||||
|
1 /* number of connected clients */ +
|
||||||
|
1 /* maximum number of connected clients */ +
|
||||||
|
1 /* is permanent flag */;
|
||||||
|
|
||||||
|
// build data vector
|
||||||
|
CVector<uint8_t> vecData ( iEntrLen );
|
||||||
|
|
||||||
|
// number of bytes for name string (2 bytes)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( iNameLen ), 2 );
|
||||||
|
|
||||||
|
// name string (n bytes)
|
||||||
|
for ( int j = 0; j < iNameLen; j++ )
|
||||||
|
{
|
||||||
|
// byte-by-byte copying of the string data
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.strName[j].toAscii() ), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// number of bytes for topic string (2 bytes)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( iTopicLen ), 2 );
|
||||||
|
|
||||||
|
// topic string (n bytes)
|
||||||
|
for ( int j = 0; j < iTopicLen; j++ )
|
||||||
|
{
|
||||||
|
// byte-by-byte copying of the string data
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.strTopic[j].toAscii() ), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// country (2 bytes)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.eCountry ), 2 );
|
||||||
|
|
||||||
|
// number of bytes for city string (2 bytes)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( iCityLen ), 2 );
|
||||||
|
|
||||||
|
// city string (n bytes)
|
||||||
|
for ( int j = 0; j < iCityLen; j++ )
|
||||||
|
{
|
||||||
|
// byte-by-byte copying of the string data
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.strCity[j].toAscii() ), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// number of connected clients (1 byte)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.iNumClients ), 1 );
|
||||||
|
|
||||||
|
// maximum number of connected clients (1 byte)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.iMaxNumClients ), 1 );
|
||||||
|
|
||||||
|
// is permanent flag (1 byte)
|
||||||
|
PutValOnStream ( vecData, iPos,
|
||||||
|
static_cast<uint32_t> ( ServerInfo.bPermanentOnline ), 1 );
|
||||||
|
|
||||||
|
CreateAndImmSendConLessMessage ( PROTMESSID_CLM_REGISTER_SERVER,
|
||||||
|
vecData,
|
||||||
|
InetAddr );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CProtocol::EvaluateCLRegisterServerMes ( const CHostAddress& InetAddr,
|
||||||
|
const CVector<uint8_t>& vecData )
|
||||||
|
{
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************\
|
/******************************************************************************\
|
||||||
* Message generation (parsing) *
|
* Message generation (parsing) *
|
||||||
|
|
|
@ -97,6 +97,8 @@ public:
|
||||||
|
|
||||||
void CreateCLPingMes ( const CHostAddress& InetAddr, const int iMs );
|
void CreateCLPingMes ( const CHostAddress& InetAddr, const int iMs );
|
||||||
void CreateCLServerFullMes ( const CHostAddress& InetAddr );
|
void CreateCLServerFullMes ( const CHostAddress& InetAddr );
|
||||||
|
void CreateCLRegisterServerMes ( const CHostAddress& InetAddr,
|
||||||
|
const CServerInfo& ServerInfo );
|
||||||
|
|
||||||
void CreateAndImmSendDisconnectionMes();
|
void CreateAndImmSendDisconnectionMes();
|
||||||
void CreateAndImmSendAcknMess ( const int& iID, const int& iCnt );
|
void CreateAndImmSendAcknMess ( const int& iID, const int& iCnt );
|
||||||
|
@ -187,6 +189,8 @@ protected:
|
||||||
bool EvaluateCLPingMes ( const CHostAddress& InetAddr,
|
bool EvaluateCLPingMes ( const CHostAddress& InetAddr,
|
||||||
const CVector<uint8_t>& vecData );
|
const CVector<uint8_t>& vecData );
|
||||||
bool EvaluateCLServerFullMes();
|
bool EvaluateCLServerFullMes();
|
||||||
|
bool EvaluateCLRegisterServerMes ( const CHostAddress& InetAddr,
|
||||||
|
const CVector<uint8_t>& vecData );
|
||||||
|
|
||||||
int iOldRecID, iOldRecCnt;
|
int iOldRecID, iOldRecCnt;
|
||||||
|
|
||||||
|
|
|
@ -73,60 +73,40 @@ class CServerListProperties
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CServerListProperties() :
|
CServerListProperties() :
|
||||||
strName ( "" ),
|
ServerInfo ( "",
|
||||||
strTopic ( "" ),
|
"",
|
||||||
eCountry ( QLocale::AnyCountry ),
|
QLocale::AnyCountry,
|
||||||
strCity ( "" ),
|
"",
|
||||||
iNumClients ( 0 ),
|
0,
|
||||||
iMaxNumClients ( 0 ),
|
0,
|
||||||
bPermanentOnline ( false ) { RegisterTime.start(); }
|
false ) { RegisterTime.start(); }
|
||||||
|
|
||||||
CServerListProperties (
|
CServerListProperties ( const CHostAddress& NIAddr,
|
||||||
const CHostAddress& NIAddr,
|
const QString& NsName,
|
||||||
const QString& NsName,
|
const QString& NsTopic,
|
||||||
const QString& NsTopic,
|
const QLocale::Country& NeCountry,
|
||||||
const QLocale::Country& NeCountry,
|
const QString& NsCity,
|
||||||
const QString& NsCity,
|
const int NiNumClients,
|
||||||
const int NiNumClients,
|
const int NiMaxNumClients,
|
||||||
const int NiMaxNumClients,
|
const bool NbPermOnline)
|
||||||
const bool NbPermOnline) :
|
: InetAddr ( NIAddr ), ServerInfo ( NsName,
|
||||||
InetAddr ( NIAddr ),
|
NsTopic,
|
||||||
strName ( NsName ),
|
NeCountry,
|
||||||
strTopic ( NsTopic ),
|
NsCity,
|
||||||
eCountry ( NeCountry ),
|
NiNumClients,
|
||||||
strCity ( NsCity ),
|
NiMaxNumClients,
|
||||||
iNumClients ( NiNumClients ),
|
NbPermOnline )
|
||||||
iMaxNumClients ( NiMaxNumClients ),
|
{ RegisterTime.start(); }
|
||||||
bPermanentOnline ( NbPermOnline ) { RegisterTime.start(); }
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// time on which the entry was registered
|
// time on which the entry was registered
|
||||||
QTime RegisterTime;
|
QTime RegisterTime;
|
||||||
|
|
||||||
// internet address of the server
|
// internet address of the server
|
||||||
CHostAddress InetAddr;
|
CHostAddress InetAddr;
|
||||||
|
|
||||||
// name of the server
|
// infos of the server
|
||||||
QString strName;
|
CServerInfo ServerInfo;
|
||||||
|
|
||||||
// topic of the current jam session or server
|
|
||||||
QString strTopic;
|
|
||||||
|
|
||||||
// country in which the server is located
|
|
||||||
QLocale::Country eCountry;
|
|
||||||
|
|
||||||
// city in which the server is located
|
|
||||||
QString strCity;
|
|
||||||
|
|
||||||
// current number of connected clients
|
|
||||||
int iNumClients;
|
|
||||||
|
|
||||||
// maximum number of clients which can connect to the server at the same
|
|
||||||
// time
|
|
||||||
int iMaxNumClients;
|
|
||||||
|
|
||||||
// is the server permanently online or not (flag)
|
|
||||||
bool bPermanentOnline;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
74
src/util.h
74
src/util.h
|
@ -34,6 +34,7 @@
|
||||||
#include <qfile.h>
|
#include <qfile.h>
|
||||||
#include <qdesktopservices.h>
|
#include <qdesktopservices.h>
|
||||||
#include <qurl.h>
|
#include <qurl.h>
|
||||||
|
#include <qlocale.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
using namespace std; // because of the library: "vector"
|
using namespace std; // because of the library: "vector"
|
||||||
|
@ -384,6 +385,8 @@ protected:
|
||||||
double dCurLevelR;
|
double dCurLevelR;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Host address ----------------------------------------------------------------
|
||||||
class CHostAddress
|
class CHostAddress
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -394,7 +397,7 @@ public:
|
||||||
CHostAddress ( const QHostAddress NInetAddr,
|
CHostAddress ( const QHostAddress NInetAddr,
|
||||||
const quint16 iNPort ) :
|
const quint16 iNPort ) :
|
||||||
InetAddr ( NInetAddr ),
|
InetAddr ( NInetAddr ),
|
||||||
iPort ( iNPort ) {}
|
iPort ( iNPort ) {}
|
||||||
|
|
||||||
CHostAddress ( const CHostAddress& NHAddr ) :
|
CHostAddress ( const CHostAddress& NHAddr ) :
|
||||||
InetAddr ( NHAddr.InetAddr ),
|
InetAddr ( NHAddr.InetAddr ),
|
||||||
|
@ -425,6 +428,8 @@ public:
|
||||||
quint16 iPort;
|
quint16 iPort;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Short info of a channel -----------------------------------------------------
|
||||||
class CChannelShortInfo
|
class CChannelShortInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -445,12 +450,70 @@ public:
|
||||||
QString strName;
|
QString strName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Server info -----------------------------------------------------------------
|
||||||
|
class CServerInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CServerInfo() :
|
||||||
|
strName ( "" ),
|
||||||
|
strTopic ( "" ),
|
||||||
|
eCountry ( QLocale::AnyCountry ),
|
||||||
|
strCity ( "" ),
|
||||||
|
iNumClients ( 0 ),
|
||||||
|
iMaxNumClients ( 0 ),
|
||||||
|
bPermanentOnline ( false ) {}
|
||||||
|
|
||||||
|
CServerInfo (
|
||||||
|
const QString& NsName,
|
||||||
|
const QString& NsTopic,
|
||||||
|
const QLocale::Country& NeCountry,
|
||||||
|
const QString& NsCity,
|
||||||
|
const int NiNumClients,
|
||||||
|
const int NiMaxNumClients,
|
||||||
|
const bool NbPermOnline) :
|
||||||
|
strName ( NsName ),
|
||||||
|
strTopic ( NsTopic ),
|
||||||
|
eCountry ( NeCountry ),
|
||||||
|
strCity ( NsCity ),
|
||||||
|
iNumClients ( NiNumClients ),
|
||||||
|
iMaxNumClients ( NiMaxNumClients ),
|
||||||
|
bPermanentOnline ( NbPermOnline ) {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
// name of the server
|
||||||
|
QString strName;
|
||||||
|
|
||||||
|
// topic of the current jam session or server
|
||||||
|
QString strTopic;
|
||||||
|
|
||||||
|
// country in which the server is located
|
||||||
|
QLocale::Country eCountry;
|
||||||
|
|
||||||
|
// city in which the server is located
|
||||||
|
QString strCity;
|
||||||
|
|
||||||
|
// current number of connected clients
|
||||||
|
int iNumClients;
|
||||||
|
|
||||||
|
// maximum number of clients which can connect to the server at the same
|
||||||
|
// time
|
||||||
|
int iMaxNumClients;
|
||||||
|
|
||||||
|
// is the server permanently online or not (flag)
|
||||||
|
bool bPermanentOnline;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Audio compression type enum -------------------------------------------------
|
||||||
enum EAudComprType
|
enum EAudComprType
|
||||||
{
|
{
|
||||||
CT_NONE = 0,
|
CT_NONE = 0,
|
||||||
CT_CELT = 1
|
CT_CELT = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Get data status enum --------------------------------------------------------
|
||||||
enum EGetDataStat
|
enum EGetDataStat
|
||||||
{
|
{
|
||||||
GS_BUFFER_OK,
|
GS_BUFFER_OK,
|
||||||
|
@ -459,12 +522,16 @@ enum EGetDataStat
|
||||||
GS_CHAN_NOT_CONNECTED
|
GS_CHAN_NOT_CONNECTED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// GUI design enum -------------------------------------------------------------
|
||||||
enum EGUIDesign
|
enum EGUIDesign
|
||||||
{
|
{
|
||||||
GD_STANDARD = 0,
|
GD_STANDARD = 0,
|
||||||
GD_ORIGINAL = 1
|
GD_ORIGINAL = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Network transport properties ------------------------------------------------
|
||||||
class CNetworkTransportProps
|
class CNetworkTransportProps
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -501,7 +568,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Audio Reverbration ----------------------------------------------------------
|
// Audio reverbration ----------------------------------------------------------
|
||||||
class CAudioReverb
|
class CAudioReverb
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -553,7 +620,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// Precise time ----------------------------------------------------------------
|
// Precise time ----------------------------------------------------------------
|
||||||
// needed for ping measurement
|
// required for ping measurement
|
||||||
class CPreciseTime
|
class CPreciseTime
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -659,6 +726,7 @@ protected:
|
||||||
int iNewValueBoundFactor;
|
int iNewValueBoundFactor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Error rate measurement ------------------------------------------------------
|
// Error rate measurement ------------------------------------------------------
|
||||||
class CErrorRate
|
class CErrorRate
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue