6016ea731b
- Change `BaseMsgReadWriter` to encode/decode messages with abstract method, which can be implemented by the subclasses. This allows us to create subclasses `FixedSizeLenMsgReadWriter` and `VarIntLenMsgReadWriter`.
30 lines
454 B
Python
30 lines
454 B
Python
from libp2p.exceptions import BaseLibp2pError
|
|
|
|
|
|
class IOException(BaseLibp2pError):
|
|
pass
|
|
|
|
|
|
class IncompleteReadError(IOException):
|
|
"""Fewer bytes were read than requested."""
|
|
|
|
|
|
class MsgioException(IOException):
|
|
pass
|
|
|
|
|
|
class MissingLengthException(MsgioException):
|
|
pass
|
|
|
|
|
|
class MissingMessageException(MsgioException):
|
|
pass
|
|
|
|
|
|
class DecryptionFailedException(MsgioException):
|
|
pass
|
|
|
|
|
|
class MessageTooLarge(MsgioException):
|
|
pass
|