1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-09-28 20:57:35 +00:00

Added LAIKAPKT_VAR_REQ, enabling variable packets

- additional minor refactoring
This commit is contained in:
2022-01-25 13:53:17 -06:00
parent 2a0e34dd5a
commit 22df7e3702
5 changed files with 35 additions and 9 deletions

View File

@@ -2,11 +2,11 @@
#include "lerror.h"
#include "bot.h"
size_t laikaB_pktSizeTbl[LAIKAPKT_MAXNONE] = {
LAIKAPKT_SIZE laikaB_pktSizeTbl[LAIKAPKT_MAXNONE] = {
[LAIKAPKT_HANDSHAKE_RES] = sizeof(uint8_t)
};
void laikaB_pktHandler(struct sLaika_peer *peer, uint8_t id, void *uData) {
void laikaB_pktHandler(struct sLaika_peer *peer, LAIKAPKT_ID id, void *uData) {
switch (id) {
case LAIKAPKT_HANDSHAKE_RES: {
uint8_t endianness = laikaS_readByte(&peer->sock);