|
@@ -19,9 +19,9 @@ MainServer::MainServer( InitDatei *zDat )
|
|
|
gesendet = 0;
|
|
|
dat = zDat->getThis();
|
|
|
serverSSL = new SSLServer();
|
|
|
- aServer->setPrivateKeyPassword( zDat->zWert( "SSLPasswort" )->getText() );
|
|
|
- aServer->setCertificateFile( zDat->zWert( "SSLCert" )->getText() );
|
|
|
- aServer->setPrivateKeyFile( zDat->zWert( "SSLKey" )->getText() );
|
|
|
+ serverSSL->setPrivateKeyPassword( zDat->zWert( "SSLPasswort" )->getText() );
|
|
|
+ serverSSL->setCertificateFile( zDat->zWert( "SSLCert" )->getText() );
|
|
|
+ serverSSL->setPrivateKeyFile( zDat->zWert( "SSLKey" )->getText() );
|
|
|
server = new Server();
|
|
|
aServer = new SSLServer();
|
|
|
aServer->setPrivateKeyPassword( zDat->zWert( "SSLPasswort" )->getText() );
|
|
@@ -59,7 +59,7 @@ MainServer::~MainServer()
|
|
|
// nicht constant
|
|
|
void MainServer::runn()
|
|
|
{
|
|
|
- while( !end )
|
|
|
+ while( !end && aServer->isConnected() )
|
|
|
{
|
|
|
SSLSKlient *klient;
|
|
|
klient = aServer->getKlient();
|
|
@@ -71,7 +71,7 @@ void MainServer::runn()
|
|
|
return;
|
|
|
}
|
|
|
if( !klient )
|
|
|
- return;
|
|
|
+ continue;
|
|
|
MSAKlient *clHandle = new MSAKlient( klient, getThis() );
|
|
|
clHandle->start();
|
|
|
}
|
|
@@ -84,23 +84,23 @@ void MainServer::thread()
|
|
|
MainServer *ms = this;
|
|
|
AsynchronCall( [ sslServer, cl, ms ]()
|
|
|
{
|
|
|
- while( 1 )
|
|
|
+ while( sslServer->isConnected() )
|
|
|
{
|
|
|
SSLSKlient *klient = sslServer->getKlient();
|
|
|
if( !klient )
|
|
|
- break;
|
|
|
+ continue;
|
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
|
MSKlientSSL *clHandle = new MSKlientSSL( klient, ms->getThis() );
|
|
|
clHandle->start();
|
|
|
(*cl)++;
|
|
|
}
|
|
|
} );
|
|
|
- while( 1 )
|
|
|
+ while( server->isConnected() )
|
|
|
{
|
|
|
SKlient *klient;
|
|
|
klient = server->getKlient();
|
|
|
if( !klient )
|
|
|
- break;
|
|
|
+ continue;
|
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
|
MSKlient *clHandle = new MSKlient( klient, getThis() );
|
|
|
clHandle->start();
|