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