UDPConnection/cpp_impl/src/UDPC_Defines.hpp

33 lines
577 B
C++
Raw Normal View History

2019-06-06 07:02:48 +00:00
#ifndef UDPC_DEFINES_HPP
#define UDPC_DEFINES_HPP
#define UDPC_CONTEXT_IDENTIFIER 0x902F4DB3
#include <cstdint>
#include <bitset>
#include <atomic>
#include "UDPConnection.h"
namespace UDPC {
struct Context {
Context(bool isThreaded);
uint_fast32_t _contextIdentifier;
/*
* 0 - isThreaded
*/
std::bitset<32> flags;
std::atomic_bool isAcceptNewConnections;
std::atomic_uint32_t protocolID;
std::atomic_uint_fast8_t loggingType;
char atostrBuf[16];
}; // struct Context
bool VerifyContext(void *ctx);
} // namespace UDPC
#endif