rewrite proxy server to support multiple clients and integration with game server
This commit is contained in:
+15
-1
@@ -33,8 +33,14 @@ union PSOCommandHeader {
|
||||
PSOCommandHeaderBB bb;
|
||||
|
||||
uint16_t command(GameVersion version) const;
|
||||
void set_command(GameVersion version, uint16_t command);
|
||||
uint16_t size(GameVersion version) const;
|
||||
void set_size(GameVersion version, uint32_t size);
|
||||
uint32_t flag(GameVersion version) const;
|
||||
void set_flag(GameVersion version, uint32_t flag);
|
||||
static inline size_t header_size(GameVersion version) {
|
||||
return (version == GameVersion::BB) ? 8 : 4;
|
||||
}
|
||||
|
||||
PSOCommandHeader();
|
||||
} __attribute__((packed));
|
||||
@@ -49,4 +55,12 @@ void for_each_received_command(
|
||||
struct bufferevent* bev,
|
||||
GameVersion version,
|
||||
PSOEncryption* crypt,
|
||||
std::function<void(uint16_t, uint16_t, const std::string&)> fn);
|
||||
std::function<void(uint16_t, uint16_t, std::string&)> fn);
|
||||
|
||||
void print_received_command(
|
||||
uint16_t command,
|
||||
uint32_t flag,
|
||||
const void* data,
|
||||
size_t size,
|
||||
GameVersion version,
|
||||
const char* name = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user