Optimization: remove unnecessary buffer resizes on partial recvs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 15:54:30 +0000 (11:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 13:19:12 +0000 (09:19 -0400)
Using the dynamic buffer's size to express the current offset
results in unnecessary resized and re-zeroing of areas of the
buffer.

The reception buffer's size is now used to express the total
size of the expected incoming message. The offset can be inferred
from the "bytes_left_to_receive" variable and message size. It
also, arguably, makes the code simpler to follow.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.02439 seconds and 4 git commands to generate.