diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2018-10-27 22:17:16 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2018-10-30 01:15:03 +0100 |
commit | a626ab534224cc244d58259e622b9a59703223f6 (patch) | |
tree | 09252abc2abf4c0fa9993ee0c7faab059fe83af0 /sid.mli | |
parent | 4175ecde16ddbb0637cfafd3a41254d995d8bab7 (diff) | |
download | ocaml-sid-a626ab534224cc244d58259e622b9a59703223f6.tar.gz |
sid: optionally handle big endian in packet format codec
Oddly enough this only has an effect on the sub_auths since the 48 bits
of “identifier authority” are always handled in big endian.
Diffstat (limited to 'sid.mli')
-rw-r--r-- | sid.mli | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -9,16 +9,15 @@ val get_sub_auths : t -> sub_auths module StringFmt : sig - val decode : string -> t - val from_string_res : string -> (t, string) result - val from_string_opt : string -> t option + val decode : string -> (t, string result) val encode : t -> string end module PacketRep : sig - val encode : t -> bytes - val decode : bytes -> (t, string) result + type endian = Big | Little + val encode : ?endian:endian -> t -> bytes + val decode : ?endian:endian -> bytes -> (t, string) result end module WellKnown : |