[99s-extend] Parsing binary example in ranch guide

Loïc Hoguin essen at ninenines.eu
Wed Jan 15 08:51:32 CET 2014


Yes.

Feel free to open a PR, thanks!

On 01/15/2014 06:42 AM, Xiao Jia wrote:
> Hi,
>
> I am learning how to use ranch and reading this page:
>
>      http://ninenines.eu/docs/en/ranch/HEAD/guide/parsers
>
>
> << Size:32, _/bits >> = Buffer,
> case Buffer of
>      << Frame:Size/binary, Rest/bits >> ->
>          handle_frame(Frame, Buffer);
>      _ ->
>          get_more_data(Buffer)
> end.
>
>
> Shouldn't it be
>
>      handle_frame(Frame, Rest);
>
> instead?
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the Extend mailing list