Skip to content

More functions less cases in Bittorrent.Peer.Protocol #2

Description

@mpope9

Mostly a style thing, but I think the case statements in the Protocol could be more beneficial than the case statements. It keeps indentation down.

The main reason that I am bring this up is that none of the :gen_tcp.recv function calls deal with errors being returned. If you refactored the case statements into function calls, you could easily field the :gen_tcp:recv errors in a single function call, instead of dealing with the errors in each case statement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions