mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
TLS layer: c->rtls to optimise recvd TLS data
This commit is contained in:
1 parent
98d877c5f0
commit
144c2f443e
12 files changed
+248
-120
No files matched your search
+1
-1
@@ -3136,7 +3136,7 @@ static void producer(void *param) {
|
||||
size_t len, ofs = sizeof(tmp);
|
||||
for (s_out = 0; s_out < NMESSAGES; s_out++) {
|
||||
if (ofs >= sizeof(tmp)) mg_random(tmp, sizeof(tmp)), ofs = 0;
|
||||
len = ((uint8_t *) tmp)[ofs] % 55 + 1;
|
||||
len = ((uint8_t *) tmp)[ofs] % 55U + 1U;
|
||||
if (ofs + len > sizeof(tmp)) len = sizeof(tmp) - ofs;
|
||||
while ((mg_queue_book(q, &buf, len)) < len) (void) 0;
|
||||
memcpy(buf, &tmp[ofs], len);
|
||||
|
||||
Reference in new issue
Block a user