feature: Add SPIT-Source as is

This commit is contained in:
2024-08-19 03:29:37 +02:00
parent a5805aceb2
commit 500641a6e2
31 changed files with 10176 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: ServerAutoDetetc_Client.h
* Author: Hagi
*
* Created on 16. April 2019, 08:57
*/
#ifndef SERVERAUTODETETC_CLIENT_H
#define SERVERAUTODETETC_CLIENT_H
#include "_SPITMACROS.h"
#include "SPIT_Handler.h"
#include "SPITSocket.h"
#include "SAD_DetectedServer.h"
#include <string>
#include <list>
static const string SERVERAUTODETECT_PRECODE = "#SAD#";
static const string SERVERAUTODETECT_SEPERATOR = "#,#";
static const string SERVERAUTODETECT_TASKID = "#spit#";
static const string SERVERAUTODETECT_PORT = "15110";
class SAD_Client {
//----- SAD Client Interface ------
private:
static recursive_mutex s_MutexClientInterface;
static SAD_ClientInterface* s_SADClientInterface;
//----- SAD_Client -----
public:
private:
static mutex s_MutexSAD;
static condition_variable s_ConditionStopSAD;
static bool s_StopSAD;
static thread* s_ThreadSend;
static thread* s_ThreadReceiveIP4;
static thread* s_ThreadReceiveIP6;
static recursive_mutex s_MutexSocket;
static SPITSocket* s_SPITSocket;
static void sendAutoDetectServer();
static void cycleStart();
static void cycleEnd();
static void receiveAutoDetectServer_IP4();
static void receiveAutoDetectServer_IP6();
public:
static void startAutoDetectServer(SAD_ClientInterface* p_SADClientInterface, SPITSocket* p_SPITSocket);
static void stopAutoDetectServer(SAD_ClientInterface* p_SADClientInterface);
};
#endif /* SERVERAUTODETETC_CLIENT_H */