Convert rabbit_stream_reader into state machine

This is pure refactoring - no functional change.

Benefits:
* code is more maintainable
* smaller methods (instead of previous 350 lines listen_loop_post_auth function)
* well defined state transitions (e.g. useful to enforce authentication protocol)
* we get some gen_statem helper functions for free (e.g. debug utilities)

Useful doc: https://ninenines.eu/docs/en/ranch/2.0/guide/protocols/
This commit is contained in:
David Ansari 2021-06-25 14:57:42 +02:00
parent ff174eaa5f
commit 81ee05f9ce
1 changed files with 711 additions and 548 deletions

File diff suppressed because it is too large Load Diff