This changes Parser#try_parse to return an array of the parsed packets after parsing.
I found it very useful when testing the responses of my SPDY server.
The return value should probably be adjusted to nil in the return statements above it in order to be consistent.
What are your thoughts?
add a spec for returning parsed packets
reuse the inflating code in the protocol
return the parsed packet(s)
First, it looks like there are two distinct commits here.. one to reuse inflating code, and another for the return types.
Yup, I see. Leaving it out makes the parser API much simpler as well, as the user is not concerned with the BinData stuff at all. It was meant as a hack for testing, maybe it should stay that way.
I will open another pull for the inflate.