Class Ftp_client.ftp_client


class ftp_client : ?event_system:Unixqueue.event_system -> ?onempty:unit -> unit -> unit -> object .. end
The ftp client is a user session that may even span several connections. However, only one server is connected at once.

method add : ?onsuccess:(unit -> unit) ->
?onerror:(exn -> unit) -> ftp_method -> unit
Adds an FTP method to the queue of methods to execute. It is no problem to add the same method twice.

When the method could be executed successfully, the function onsuccess is called. If an error occurs, the function onerror is called instead. (Only soft errors are reported this way; the queue is continued to be executed.)

TODO: onerror is currently not called!

method run : unit -> unit
Starts the event system; same as Unixqueue.run