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.
Inherits
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. (By default, this function does nothing.)

If the FTP server indicates an error, the function onerror is called instead. The exception is either FTP_method_temp_failure or FTP_method_perm_failure. The default for onerror is to raise the exception again, which has the effect of setting the engine state to `Error. This effectively stops the FTP client. (Hard errors like socket problems or protocol violations are not reported this way, but by directly setting the engine state to `Error.)

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