with_connopens a connection to the TCP service on
portand if successful calls
fwith In_channel.t and Out_channel.t as arguments. The return value of
fwill be returned by
with_conn raises Connect_timeout if the connection attempt times out.
Unix_error will be raised if there are any other connect errors.
Any exceptions raised by
f will be re-raised, which may include
Unix_errors raised by underlying channel read/write calls.
Out_channel.t, and underlying socket
will be closed by with_conn before it returns.
val with_connection :
?timeout:Core.Std.Time.Span.t -> host:string -> port:int -> f:(Core.Std.In_channel.t -> Core.Std.Out_channel.t -> 'a) -> unit -> 'a