How to send and receive files with XMPP library.

Dec 4, 2014 at 7:12 AM
Edited Dec 4, 2014 at 7:14 AM

I want to know how can we send and receive files with XMPP library also I was looking for retrieval for offline message when user is offline.
Thanks in Advance.
Mar 2, 2015 at 7:40 PM
Edited Mar 2, 2015 at 7:42 PM
Receive works to me:
                client.FileTransferManager.OnTransferFinished += new FileTransferManager.DelegateDownloadFinished(FileTransferManager_OnTransferFinished);
                client.FileTransferManager.OnNewIncomingFileTransferRequest += new FileTransferManager.DelegateIncomingFile(FileTransferManager_OnNewIncomingFileTransferRequest);
        void FileTransferManager_OnTransferFinished(FileTransfer trans)
            System.IO.File.WriteAllBytes(trans.FileName, trans.Bytes);            

        private void FileTransferManager_OnNewIncomingFileTransferRequest(FileTransfer trans, RosterItem itemfrom)
Send not works... I tried:
JID to = new JID();
to.User = "user756";
to.Domain = "";
client.FileTransferManager.SendFile(@"C:\files\image.gif", to);