Offers the specified file to the XMPP user with the specified JID and, if
accepted by the user, transfers the file.
Namespace: S22.Xmpp.ClientAssembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public void InitiateFileTransfer( Jid to, string path, string description = null, Action<bool, FileTransfer> cb = null ) |
Parameters
- to
- Type: S22.Xmpp..::..Jid
The JID of the XMPP user to offer the file to.
- path
- Type: System..::..String
The path of the file to transfer.
- description (Optional)
- Type: System..::..String
A description of the file so the receiver can better understand what is being sent.
- cb (Optional)
- Type: System..::..Action<(Of <(<'Boolean, FileTransfer>)>)>
a callback method invoked once the other site has accepted or rejected the file-transfer request.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The to parameter or the path parameter is null. |
System..::..ArgumentException | path is a zero-length string, contains only white space, or contains one or more invalid characters. |
System.IO..::..PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. |
System.IO..::..DirectoryNotFoundException | The specified path is invalid, (for example, it is on an unmapped drive). |
System..::..UnauthorizedAccessException | path specified a directory, or the caller does not have the required permission. |
System.IO..::..FileNotFoundException | The file specified in path was not found. |
System..::..NotSupportedException | path is in an invalid format, or the XMPP entity with the specified JID does not support the 'SI File Transfer' XMPP extension. |
S22.Xmpp..::..XmppErrorException | The server or the XMPP entity with the specified JID returned an XMPP error code. Use the Error property of the XmppErrorException to obtain the specific error condition. |
S22.Xmpp..::..XmppException | The server returned invalid data or another unspecified XMPP error occurred. |
System..::..InvalidOperationException | The XmppClient instance is not connected to a remote host, or the XmppClient instance has not authenticated with the XMPP server. |
System..::..ObjectDisposedException | The XmppClient object has been disposed. |