DragonNest/Common/NetworkLib/NetCommon.h
2024-12-20 16:56:44 +08:00

54 lines
No EOL
1.6 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <windows.h>
#include <winsock2.h>
#include <winbase.h>
#include <process.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <tchar.h>
#include <time.h>
#include <vector>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <string>
#include <utility>
#include "SundriesFunc.h"
#include "CriticalSection.h"
struct TUDP_HEADER
{
USHORT Len;
USHORT Cmd;
UINT ConUID; // Connection UID
BYTE Mode;
};
/*
struct TSendPacketData
{
USHORT Len;
USHORT AckCount;
USHORT State;
DWORD SendTick;
};
*/
inline UINT GetPacketSequence()
{
static UINT PacketSequence = 0;
PacketSequence++;
if (PacketSequence > 4000000000) PacketSequence = 0;
return PacketSequence;
}