36 lines
981 B
C++
36 lines
981 B
C++
#pragma once
|
|
|
|
#include "ProxiedClient.h"
|
|
#include <string>
|
|
#include <Definitions.h>
|
|
#include <protocol/CryptionHandler.h>
|
|
|
|
namespace ts {
|
|
namespace flood {
|
|
enum TSClientConnectionState {
|
|
TSC_UNCONNECTED,
|
|
TSC_PRE,
|
|
TSC_RSA,
|
|
TSC_HIGH,
|
|
TSC_CONNECTED
|
|
};
|
|
|
|
class TSClient {
|
|
public:
|
|
TSClient(ProxiedClient*);
|
|
~TSClient();
|
|
|
|
void startConnect();
|
|
void handleMessageRead(const std::string&);
|
|
|
|
void sendPacket(ts::protocol::ClientPacket &packet, int32_t packetId = -1);
|
|
private:
|
|
ProxiedClient* connection;
|
|
TSClientConnectionState state = TSClientConnectionState::TSC_UNCONNECTED;
|
|
protocol::PacketIdManager pktIdManager;
|
|
ts::connection::CryptionHandler* cryptionHandler = nullptr;
|
|
|
|
ClientId clientId = 0;
|
|
};
|
|
}
|
|
} |