fnet.c

Simple C networking library
git clone git://git.finwo.net/lib/fnet.c
Log | Files | Refs | README

commit e63ea4d463bfcb9e30a388f65c97afc2a275b2d2
parent a036103c4bfd39c21ff3b4814da5045345cf43be
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Fri, 17 Nov 2023 00:12:15 +0100

Mark what's borked on windows

Diffstat:
Msrc/fnet.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/fnet.c b/src/fnet.c @@ -460,8 +460,12 @@ FNET_RETURNCODE fnet_process(const struct fnet_t *connection) { if (conn->ext.status & FNET_STATUS_CONNECTED) { rbuf = malloc(sizeof(struct buf)); + + + // BORKED ON WINDOWS (512), DOESN'T GET THE WHOLE MESSAGE rbuf->data = malloc(BUFSIZ); rbuf->cap = BUFSIZ; + for ( i = 0 ; i < conn->nfds ; i++ ) { n = recv(conn->fds[i], rbuf->data, rbuf->cap, 0); printf("Received %d bytes\n", n);