aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.ml')
-rw-r--r--src/util.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util.ml b/src/util.ml
index ae1f049..87e779e 100644
--- a/src/util.ml
+++ b/src/util.ml
@@ -2,9 +2,12 @@ open Unix
let (@@) a b = a b
-type id = int * int
-let new_id () : id = (Random.int 10000000, Random.int 10000000)
-let id_str (a, b) = Format.sprintf "%d.%d" a b
+type id = int * int * int
+let new_id () : id =
+ ( Random.int 10000000,
+ Random.int 10000000,
+ Random.int 10000000 )
+let id_str (a, b, c) = Format.sprintf "%d.%d.%d" a b c
(* make_addr : string -> int -> sockaddr *)
let make_addr host port =