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

Xiao Jia me at xiao-jia.com
Wed Jan 15 06:42:46 CET 2014


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?

-- 
Regards,
Xiao Jia



More information about the Extend mailing list