Closed GoogleCodeExporter closed 8 years ago
Hello,
This is not an issue, this is your question. If you have question, please email
me
at: freezingsoft@hotmail.com
Regards,
Pang WU
Original comment by freezing...@gmail.com
on 24 May 2010 at 2:27
The following is the tip, but you should email me next time:
//You use the following code to start a file transfer:
MSNSLPHandler msnslpHandler = _messenger.GetMSNSLPHandler(contact);
FileStream fileStream = new FileStream(filename, FileMode.Open,
FileAccess.Read,
FileShare.Read);
P2PTransferSession session = msnslpHandler.SendInvitation
(_messenger.ContactList.Owner, contact, Path.GetFileName(filename), fileStream);
//To cancel it, just try:
session.AbortTransfer();
Original comment by freezing...@gmail.com
on 24 May 2010 at 2:32
//If you are the receiver of a file transfer, you should do as follows:
//You use this piece of code to accept a file transfer (Please refer the
DotMSN.cs
if you don't know what I am talking about)
e.TransferSession.DataStream = new FileStream(saveFileDialog.FileName,
FileMode.Create, FileAccess.Write);
e.Accept = true;
e.TransferSession.AutoCloseStream = true;
//So e.TransferSession is the P2PTransferSession. If you want to cancel, please
save
the TransferSession object and call AbortTransfer()
e.TransferSession.AbortTransfer();
Original comment by freezing...@gmail.com
on 24 May 2010 at 2:39
Original issue reported on code.google.com by
2884...@gmail.com
on 24 May 2010 at 9:14