Stop transfer in FileTransferProgress Event

Advertisement

bpacilio59
Joined:
Posts:
4

Stop transfer in FileTransferProgress Event

I sometimes have large downloads or uploads that may need to be interrupted. Can I stop the transfer from withing the FileTransferProgress event ? I don't want to end the session, I just want to stop the current tranfer

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: Stop transfer in FileTransferProgress Event

No, this is not supported. Ending session is the only way.

Reply with quote

bpacilio59
Joined:
Posts:
4

Re: Stop transfer in FileTransferProgress Event

Given this is the only way, I would be ending the session from the FileTransferProgess Event. Would I be better off using the session->close or the session->abort ?

martin wrote:

No, this is not supported. Ending session is the only way.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: Stop transfer in FileTransferProgress Event

Use the Abort. The Close won't work.

Reply with quote

Barlo
Joined:
Posts:
9

Session abort example

Hi,
I'm using session.SynchronizeDirectories, but sometimes is needed stop the transfer. The issue is that I dont't know how to use session.abort. I have added a new button to the form to implement the stop funcionality.
Could you please write an example of this?

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: Session abort example

Sorry, but we are not a code writing service here.

Reply with quote

Barlo
Joined:
Posts:
9

Thank you Martin,
In that case, could you please, give me some idea, using words, about how to use session.abort in the middle of a transfer so it takes effect?

Thank you in advance.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

I do not understand the question. Just call it. From another thread. Or from some event handler.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum