Offers the specified file to the XMPP user with the specified JID and, if accepted by the user, transfers the file.

Namespace: S22.Xmpp.Client
Assembly: 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

ExceptionCondition
System..::..ArgumentNullExceptionThe to parameter or the path parameter is null.
System..::..ArgumentExceptionpath is a zero-length string, contains only white space, or contains one or more invalid characters.
System.IO..::..PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length.
System.IO..::..DirectoryNotFoundExceptionThe specified path is invalid, (for example, it is on an unmapped drive).
System..::..UnauthorizedAccessExceptionpath specified a directory, or the caller does not have the required permission.
System.IO..::..FileNotFoundExceptionThe file specified in path was not found.
System..::..NotSupportedExceptionpath is in an invalid format, or the XMPP entity with the specified JID does not support the 'SI File Transfer' XMPP extension.
S22.Xmpp..::..XmppErrorExceptionThe 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..::..XmppExceptionThe server returned invalid data or another unspecified XMPP error occurred.
System..::..InvalidOperationExceptionThe XmppClient instance is not connected to a remote host, or the XmppClient instance has not authenticated with the XMPP server.
System..::..ObjectDisposedExceptionThe XmppClient object has been disposed.

See Also