summaryrefslogtreecommitdiff
path: root/src/util.ml
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-05-25 21:54:20 +0200
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-05-25 21:54:20 +0200
commit8456506c0b9c8e78eec2cc464851cef36ca03398 (patch)
tree497522a4422a1290ac3dae006c2808c293216c5d /src/util.ml
parent60ba54ffe01be85ec6f1d6948c1ca4b6db1cf165 (diff)
downloadSystemeReseaux-Projet-8456506c0b9c8e78eec2cc464851cef36ca03398.tar.gz
SystemeReseaux-Projet-8456506c0b9c8e78eec2cc464851cef36ca03398.zip
Revise build system.
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 =