Add splitAtMost to IOBufQueue.
authorKyle Nekritz <knekritz@fb.com>
Thu, 3 Nov 2016 22:53:52 +0000 (15:53 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Thu, 3 Nov 2016 23:08:59 +0000 (16:08 -0700)
commit4b4183cec9704344fa139d8eb3a962b28aad3f87
treefe3dffdcef66542babc1f884a972f8153065c61f
parent564c79afcb0f462dcf8eb73f2627fe4a96e774f5
Add splitAtMost to IOBufQueue.

Summary: This allows getting up to n bytes from the queue without first having to check the length.

Reviewed By: yfeldblum

Differential Revision: D4083484

fbshipit-source-id: 2a468992c97f036c22f1a0d9f830e6d5286a4bc2
folly/io/IOBufQueue.cpp
folly/io/IOBufQueue.h
folly/io/test/IOBufQueueTest.cpp