summaryrefslogtreecommitdiff
path: root/sid.mli
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2018-10-27 22:17:16 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2018-10-30 01:15:03 +0100
commita626ab534224cc244d58259e622b9a59703223f6 (patch)
tree09252abc2abf4c0fa9993ee0c7faab059fe83af0 /sid.mli
parent4175ecde16ddbb0637cfafd3a41254d995d8bab7 (diff)
downloadocaml-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.mli9
1 files changed, 4 insertions, 5 deletions
diff --git a/sid.mli b/sid.mli
index 7c0451c..12d31a9 100644
--- a/sid.mli
+++ b/sid.mli
@@ -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 :