mirror of
https://github.com/HikikoMarmy/Champions-Reborn-Server.git
synced 2026-04-04 16:49:47 -03:00
Reorganized and cleaned up the solution.
This commit is contained in:
41
Include/Network/Event/RequestDoClientDiscovery_RTA.hpp
Normal file
41
Include/Network/Event/RequestDoClientDiscovery_RTA.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestDoClientDiscovery_RTA : public GenericRequest {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_localAddr;
|
||||
int32_t m_localPort;
|
||||
|
||||
uint32_t m_gameId;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
TIMEOUT,
|
||||
NOT_FOUND
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestDoClientDiscovery_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestDoClientDiscovery_RTA >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultDoClientDiscovery_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIp;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultDoClientDiscovery_RTA( GenericRequest *request, int32_t reply, std::string discoveryIp = "", int32_t discoveryPort = 0);
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
Reference in New Issue
Block a user