1
0
mirror of https://github.com/CPunch/Laika.git synced 2026-01-03 11:30:42 +00:00

Added panel-specific packets

- laikaP_iterList for iterating over pollList
- laikaS_consumeRead for throwing away padding or otherwise unneeded bytes
	in the socket's inbuffer
- incremented minor version
This commit is contained in:
2022-02-10 16:56:40 -06:00
parent a6bd244431
commit 49a992c70a
9 changed files with 48 additions and 8 deletions

View File

@@ -172,6 +172,10 @@ bool laikaS_setNonBlock(struct sLaika_socket *sock) {
return true;
}
void laikaS_consumeRead(struct sLaika_socket *sock, size_t sz) {
laikaM_rmvarray(sock->inBuf, sock->inCount, 0, sz);
}
void laikaS_read(struct sLaika_socket *sock, void *buf, size_t sz) {
memcpy(buf, sock->inBuf, sz);
laikaM_rmvarray(sock->inBuf, sock->inCount, 0, sz);