Safe Haskell | None |
---|
Encapsulates parsing and generation of TFTP Messages
- data Message
- data Mode
- data TFTPError
- decode :: Binary a => ByteString -> a
- encode :: Binary a => a -> ByteString
- convertMode :: Mode -> Mode -> ByteString -> ByteString
Documentation
TFTP message type.
The data mode to encode the data with
The error codes as defined in the RFC 1350
ErrorMessage String | Encapsulates a custom message for a non-standard error |
FileNotFound | |
AccessViolation | |
DiskFull | |
IllegalTFTPOperation | |
UnknownTransferID | |
FileAlreadyExists | |
NoSuchUser |
decode :: Binary a => ByteString -> a
Decode a value from a lazy ByteString, reconstructing the original structure.
encode :: Binary a => a -> ByteString
Encode a value using binary serialisation to a lazy ByteString.
convertMode :: Mode -> Mode -> ByteString -> ByteStringSource
Convert a ByteString
encoded in fromMode
to a ByteString
encoded in
toMode
.