Function silc_client_file_send
SYNOPSIS
SilcClientFileError
silc_client_file_send(SilcClient client,
SilcClientConnection conn,
SilcClientFileMonitor monitor,
void *monitor_context,
const char *local_ip,
SilcUInt32 local_port,
bool do_not_bind,
SilcClientEntry client_entry,
const char *filepath);
SilcUInt32 *session_id);
DESCRIPTION
Sends a file indicated by the `filepath' to the remote client
indicated by the `client_entry'. This will negotiate a secret key
with the remote client before actually starting the transmission of
the file. The `monitor' callback will be called to monitor the
transmission of the file.
This returns a file session ID for the file transmission to the
`session_id' pointer. It can be used to close the session (and
abort the file transmission) by calling the silc_client_file_close
function. The session ID is also returned in the `monitor' callback.
If the `local_ip' is provided then this will try to bind the
listener for key exchange protocol to that IP. If `local_port' is
non-zero that port is used. If `local_ip' is NULL then this will
automatically attempt to bind it to local IP address of the machine.
If `do_not_bind' is TRUE then the `local_ip' and `local_port' are
ignored and it is expected that the receiver will provide the
point of contact. This is usefull if the sender is behind NAT.
If error will occur during the file transfer process the error
status will be returned in the monitor callback. In this case
the application must call silc_client_file_close to close the
session.
|