Skip to content

MG_IO_SIZE #2736

Discussion options

You must be logged in to vote

Mongoose resizes its buffer in MG_IO_SIZE-size chunks up to MG_MAX_RECV_SIZE.

mongoose/mongoose.c

Lines 7386 to 7397 in 497df68

static bool ioalloc(struct mg_connection *c, struct mg_iobuf *io) {
bool res = false;
if (io->len >= MG_MAX_RECV_SIZE) {
mg_error(c, "MG_MAX_RECV_SIZE");
} else if (io->size <= io->len &&
!mg_iobuf_resize(io, io->size + MG_IO_SIZE)) {
mg_error(c, "OOM");
} else {
res = true;
}
return res;
}

It is very hard for me to guess what is going on with such a description. What exactly happens ?
Please sniff your network (using Wireshark, for example) and observe the traffic.
Please see the logs.
What…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants