Module Async_extra.Tcp_file.Client

type t
module Error : sig ... end
module Message : sig ... end
module Response : sig ... end
val connect : host:string ‑> port:int ‑> (tCore.Exn.tCore.Result.t Import.Deferred.t
val disconnect : t ‑> unit Import.Deferred.t

Pipes delivered by read/tail will be closed.

val read : ?client_pushes_back:unit ‑> t ‑> string ‑> Response.t Import.Pipe.Reader.t Import.Deferred.t

read ?client_pushes_back t filename provides a pipe that will be filled with messages from filename starting from the beginning, and continuing until the server calls unlink or close. The client can indicate that it is no longer interested by calling Pipe.close_reader. See Rpc.Pipe_rpc.create for the definition on ?client_pushes_back and its implications. Passing the client_pushes_back argument will have no detrimental effect on a server that is delivering from a file. If the client caught up, effectively tailing the file, then the server will enqueue the data in memory until the client catches up, or gets disconnected.

val tail : ?client_pushes_back:unit ‑> t ‑> string ‑> Response.t Import.Pipe.Reader.t Import.Deferred.t

tail ?client_pushes_back t filename same as read, but delivers messages starting at some unspecified point near the current end of the file and continuing until the server calls unlink or close. The client can indicate that it is no longer interested by calling Pipe.close_reader.