1
0
Fork 0

Fixed Server.cpp

Performance improvement.
This commit is contained in:
Creaprog 2015-02-15 14:29:11 +01:00
parent b7e761e5c0
commit 5797f99def
1 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ int cServer::Init(short a_ListenPort, short a_ConnectPort)
}
#endif // _WIN32
printf("Generating protocol encryption keypair...\n");
puts("Generating protocol encryption keypair...");
m_PrivateKey.Generate();
m_PublicKeyDER = m_PrivateKey.GetPubKeyDER();
@ -85,7 +85,7 @@ int cServer::Init(short a_ListenPort, short a_ConnectPort)
void cServer::Run(void)
{
printf("Server running.\n");
puts("Server running.");
while (true)
{
sockaddr_in Addr;
@ -97,10 +97,10 @@ void cServer::Run(void)
printf("accept returned an error: %d; bailing out.\n", SocketError);
return;
}
printf("Client connected, proxying...\n");
puts("Client connected, proxying...");
cConnection Connection(client, *this);
Connection.Run();
printf("Client disconnected. Ready for another connection.\n");
puts("Client disconnected. Ready for another connection.");
}
}