Closed charlie-wasp closed 5 years ago
Maybe rename short MsgRecvError
to full variant MessageReceiveError
?
The same suggestion for TCP(std::io::Error),
to something like BrokenFrame(std::io::Error)
. What do you think?
I thought, we're doing some cool system programming here, so we should choose incomprehensible short names 😅 Ok, I rename it
Talking about TCP
: I think BrokenFrame
would be misleading, because this kind of errors includes network level errors, e.g. connection reset
Resolves #26 (I believe 😅 )
In this PR I wrapped io errors and
serde
parsing errors into oneenum
, it allows to eliminate panics from network errors inPeer::receive_message
and handle errors consistently