Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
607 changes: 607 additions & 0 deletions socket.cpp

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ CClient::CClient ( const quint16 iPortNumber,
const QString& strMIDISetup,
const bool bNoAutoJackConnect,
const QString& strNClientName,
const bool bNMuteMeInPersonalMix ) :
const bool bNMuteMeInPersonalMix,
int ipmode ) :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use spaces, be consistent with the existing source.

ChannelInfo ( ),
strClientName ( strNClientName ),
Channel ( false ), /* we need a client channel -> "false" */
Expand Down Expand Up @@ -62,6 +63,7 @@ CClient::CClient ( const quint16 iPortNumber,
bEnableOPUS64 ( false ),
bJitterBufferOK ( true ),
bNuteMeInPersonalMix ( bNMuteMeInPersonalMix ),
iipmode ( ipmode ),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above - spaces not tabs, please.

iServerSockBufNumFrames ( DEF_NET_BUF_SIZE_NUM_BL ),
pSignalHandler ( CSignalHandler::getSingletonP() )
{
Expand Down Expand Up @@ -389,7 +391,8 @@ bool CClient::SetServerAddr ( QString strNAddr )
{
CHostAddress HostAddress;
if ( NetworkUtil().ParseNetworkAddress ( strNAddr,
HostAddress ) )
HostAddress,
iipmode ) )
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

{
// apply address to the channel
Channel.SetAddress ( HostAddress );
Expand Down
4 changes: 3 additions & 1 deletion src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ class CClient : public QObject
const QString& strMIDISetup,
const bool bNoAutoJackConnect,
const QString& strNClientName,
const bool bNMuteMeInPersonalMix );
const bool bNMuteMeInPersonalMix,
int ipmode=0 );
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.


virtual ~CClient();

Expand Down Expand Up @@ -355,6 +356,7 @@ class CClient : public QObject

bool bJitterBufferOK;
bool bNuteMeInPersonalMix;
int iipmode;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

QMutex MutexDriverReinit;

// server settings
Expand Down
2 changes: 1 addition & 1 deletion src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ LED bar: lbr
#define MAX_LEN_CHAT_TEXT 1600
#define MAX_LEN_CHAT_TEXT_PLUS_HTML 1800
#define MAX_LEN_SERVER_NAME 20
#define MAX_LEN_IP_ADDRESS 15
#define MAX_LEN_IP_ADDRESS 40
#define MAX_LEN_SERVER_CITY 20
#define MAX_LEN_VERSION_TEXT 30

Expand Down
41 changes: 40 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ int main ( int argc, char** argv )
QString strServerListFilter = "";
QString strWelcomeMessage = "";
QString strClientName = "";
int ipmode = 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.


#if !defined(HEADLESS) && defined(_WIN32)
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
Expand Down Expand Up @@ -140,6 +141,41 @@ int main ( int argc, char** argv )
continue;
}

// Use ipv4 protocol
if ( GetFlagArgument ( argv,
i,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

"-4",
"--ipv4" ))
{
switch (ipmode)
{
case 0: ipmode = 1; break;
case 1: break;
case 2: ipmode = 3; break;
case 3: break;
default: break;
}
CommandLineOptions << "--ipv4";
continue;
}

// Use ipv6 protocol
if ( GetFlagArgument ( argv,
i,
"-6",
"--ipv6" ))
{
switch (ipmode)
{
case 0: ipmode = 2; break;
case 1: ipmode = 0; break;
case 2: break;
case 3: break;
default: break;
}
CommandLineOptions << "--ipv6";
continue;
}

// Use 64 samples frame size mode --------------------------------------
if ( GetFlagArgument ( argv,
Expand Down Expand Up @@ -697,7 +733,8 @@ int main ( int argc, char** argv )
strMIDISetup,
bNoAutoJackConnect,
strClientName,
bMuteMeInPersonalMix );
bMuteMeInPersonalMix,
ipmode );

// load settings from init-file (command line options override)
CClientSettings Settings ( &Client, strIniFileName );
Expand Down Expand Up @@ -846,6 +883,8 @@ QString UsageArguments ( char **argv )
" -p, --port set your local port number\n"
" -t, --notranslation disable translation (use English language)\n"
" -v, --version output version information and exit\n"
" -4, --ipv4 use IPv4 Protocol\n"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

" -6 --ipv6 use IPv6 Protocol (order of -4 and -6 will be followed\n"
"\nServer only:\n"
" -d, --discononquit disconnect all clients on quit\n"
" -e, --centralserver address of the server list on which to register\n"
Expand Down
2 changes: 2 additions & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CSettings : public QObject
CSettings() :
vecWindowPosMain ( ), // empty array
strLanguage ( "" ),
iipmode ( 0 ),
strFileName ( "" )
{
QObject::connect ( QCoreApplication::instance(), &QCoreApplication::aboutToQuit,
Expand All @@ -58,6 +59,7 @@ class CSettings : public QObject
// common settings
QByteArray vecWindowPosMain;
QString strLanguage;
int iipmode;

protected:
virtual void WriteSettingsToXML ( QDomDocument& IniXMLDocument ) = 0;
Expand Down
Loading