Feature: Implement KCP protocol - based on UDP
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#define XXH_INLINE_ALL
|
||||
#include "xxhash.h"
|
||||
#include <WS2tcpip.h>
|
||||
#include <common/ikcp.h>
|
||||
|
||||
#define PACKET_LENGTH 0x2000
|
||||
|
||||
@@ -309,7 +310,12 @@ public:
|
||||
typedef class CONTEXT_OBJECT : public context
|
||||
{
|
||||
public:
|
||||
virtual ~CONTEXT_OBJECT(){}
|
||||
virtual ~CONTEXT_OBJECT(){
|
||||
if (kcp) {
|
||||
ikcp_release(kcp);
|
||||
kcp = nullptr;
|
||||
}
|
||||
}
|
||||
CString sClientInfo[ONLINELIST_MAX];
|
||||
CString additonalInfo[RES_MAX];
|
||||
SOCKET sClientSocket;
|
||||
@@ -330,6 +336,7 @@ public:
|
||||
BOOL bLogin; // <20>Ƿ<EFBFBD> login
|
||||
std::string PeerName; // <20>Զ<EFBFBD>IP
|
||||
Server* server; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ikcpcb* kcp = nullptr; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>KCP<43>Ự
|
||||
|
||||
std::string GetProtocol() const override {
|
||||
return Parser.m_Masker && Parser.m_Masker->GetMaskType() == MaskTypeNone ? "TCP" : "HTTP";
|
||||
|
||||
Reference in New Issue
Block a user