Back to product page

FileDone event


Fires when file transfer completes.

Syntax

  • C#
  • C++
  • VB.NET
delegate void devP2P.FileDoneEvent(IntPtr Handle, int chanid, int errorno);
The FileDone(Handle,chanid,error) syntax has these parts:
HandleReference to the devP2P instance.
chanidIndex of the channel where file is being transferred.
errorErrors value, ErrorNone if operation is successful, or other value defining the error that occurred.

void FileDone(CP2P *p2p, int chanid, Errors error);
The FileDone(p2p,chanid,error) syntax has these parts:
p2pPointer to devP2P instance that fired the event.
chanidIndex of the channel where file is being transferred.
errorErrors value, ErrorNone if operation is successful, or other value defining the error that occurred.

Delegate Sub P2P_FileDoneEvent(ByVal Handle As IntPtr, ByVal chanid As Integer, ByVal errorno As Integer)
The FileDone(Handle,chanid,error) syntax has these parts:
HandleReference to the devP2P instance.
chanidIndex of the channel where file is being transferred.
errorErrors value, ErrorNone if operation is successful, or other value defining the error that occurred.

Remarks

FileDone fires when transfer completes and file is received (or sent) by the beer. Error argument will contain possible error if transfer failed. From now channel that was used for the transfer is freed and you can use it for some other operation.

To use this event, you should implement function by yourself in the code (based on function declaration), and set devP2P.Events.FileDone structure member to point to your function.

Code sample

  • C++

Platforms

Windows
Mac OSX
Linux
BSD