ajout LoginInfo dans le parseur de paquet.

This commit is contained in:
MarcEricMartel
2023-10-25 10:00:54 -04:00
parent 4964bc5394
commit dd2396e5e4
3 changed files with 108 additions and 164 deletions

View File

@@ -20,7 +20,7 @@ namespace netprot {
};
struct Packet {
void* ptr;
void* ptr = nullptr;
PACKET_TYPE type;
};
@@ -120,9 +120,10 @@ namespace netprot {
bool Deserialize(Chat* chat, char* buf, const uint32_t buflen); // srv/cli
bool Deserialize(ErrorLog* errlog, char* buf, const uint32_t buflen); // srv
PacketType getType(char* buf, uint32_t buflen); // srv/cli
PacketType getType(char* buf, uint32_t buflen);
Packet getPack(char* buf, uint32_t buflen);
bool emptyPack(Packet pck);
template <class T> void sendPack(SOCKET sock, T* pack, char** buf, uint32_t* buflen);
template <class T> void sendPackTo(SOCKET sock, T* pack, char** buf, uint32_t* buflen, sockaddr_in* sockad);