StartTransfer Event

Fired when a file transfer begins.

Syntax

public event OnStartTransferHandler OnStartTransfer;

public delegate void OnStartTransferHandler(object sender, XmppStartTransferEventArgs e);

public class XmppStartTransferEventArgs : EventArgs {
  public int Direction { get; }
  public string FileId { get; }
  public string User { get; }
  public string Domain { get; }
  public string Resource { get; }
  public string Filename { get; set; }
  public string Datetime { get; }
  public long Size { get; }
  public bool Accept { get; set; }
}
Public Event OnStartTransfer As OnStartTransferHandler

Public Delegate Sub OnStartTransferHandler(sender As Object, e As XmppStartTransferEventArgs)

Public Class XmppStartTransferEventArgs Inherits EventArgs
  Public ReadOnly Property Direction As Integer
  Public ReadOnly Property FileId As String
  Public ReadOnly Property User As String
  Public ReadOnly Property Domain As String
  Public ReadOnly Property Resource As String
  Public Property Filename As String
  Public ReadOnly Property Datetime As String
  Public ReadOnly Property Size As Long
  Public Property Accept As Boolean
End Class

Remarks

When a file is received, the XMPP component will parse the sender's Jabber ID into the User, Domain, and Resource fields. The FileId and Filename parameters identify the current transfer. Within this event you may override the Filename by setting the Filename parameter. At this time you may also set LocalDirectory if it is not already set or call SetReceiveStream.

When a sending a file, the XMPP component will parse the receiver's Jabber ID into the User, Domain, and Resource fields.

The Direction parameter shows whether the client (0) or the server (1) is sending the data.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 .NET Edition - Version 20.0 [Build 8155]