]> git.meshlink.io Git - meshlink/commit
Add simple buffer management code.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 14 May 2011 17:15:04 +0000 (19:15 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 14 May 2011 17:15:04 +0000 (19:15 +0200)
commitf431fcb35f400be388a905ae0f7f50c1f5c4cd5d
treef2613397b8326895ba578490241b8d7f025ec4bb
parent3794e551c7db9aa81405f65f7b04a9951c4120b2
Add simple buffer management code.

Libevent 2.0's buffer code is not completely backward compatible with 1.4's.
In order to not (mis)use it anymore, we implement it ourselves. The buffers
are automatically expanding when necessary. When consuming data from the
buffer, no memmove()s are performed. Only when adding to the buffer would
write past the end do we shift everything back to the start.
src/Makefile.am
src/buffer.c [new file with mode: 0644]
src/buffer.h [new file with mode: 0644]