mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 21:15:39 +02:00
Keep alive information added to logs
This commit is contained in:
@@ -122,11 +122,11 @@ public class TCPController
|
|||||||
dynamic dynamicRawTCPFrame = JsonConvert.DeserializeObject(strReceivedData); // Deserialize received frame
|
dynamic dynamicRawTCPFrame = JsonConvert.DeserializeObject(strReceivedData); // Deserialize received frame
|
||||||
string strRawTCPFrameType = dynamicRawTCPFrame.type;
|
string strRawTCPFrameType = dynamicRawTCPFrame.type;
|
||||||
|
|
||||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP packet received, type: " + strRawTCPFrameType,2);
|
// Check if this is NOT keep alive
|
||||||
|
|
||||||
// Add to mySQL send buffer (find first empty slot)
|
|
||||||
if (Int32.Parse(strRawTCPFrameType) != 0)
|
if (Int32.Parse(strRawTCPFrameType) != 0)
|
||||||
{
|
{
|
||||||
|
// Add to mySQL send buffer (find first empty slot)
|
||||||
|
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP packet received, type: " + strRawTCPFrameType, 2);
|
||||||
for (int i = 0; i < arrMySQLSendBuffer.Length - 1; i++)
|
for (int i = 0; i < arrMySQLSendBuffer.Length - 1; i++)
|
||||||
{
|
{
|
||||||
if (arrMySQLSendBuffer[i] == null)
|
if (arrMySQLSendBuffer[i] == null)
|
||||||
@@ -135,6 +135,10 @@ public class TCPController
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// Keep alive
|
||||||
|
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "Keep-alive received", 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user