Anonymous
public text v1 · immutable (* Bind it to the port.
*)
log (fun () -> sprintf "port=%d" port) ;
let addr =
match Arge.get Arge.host_ip with
| None -> Hsys.inet_any()
| Some host -> Arge.inet_of_string Arge.host_ip host
in
begin try
Hsys.bind sock (Hsys.inet_any ()) port ;
with e ->
eprintf "IPMC:error:binding to port %d:%s\n" port (Util.error e) ;
exit 1
end ;