file_send_chunk


Description:

public bool file_send_chunk (uint32 friend_number, uint32 file_number, uint64 position, uint8[] data, out ErrFileSendChunk error = null)

Send a chunk of file data to a friend.

This function is called in response to the `file_chunk_request` callback. The length parameter should be equal to the one received though the callback. If it is zero, the transfer is assumed complete. For files with known size, Core will know that the transfer is complete after the last byte has been received, so it is not necessary (though not harmful) to send a zero-length chunk to terminate. For streams, core will know that the transfer is finished if a chunk with length less than the length requested in the callback is sent.

Parameters:

friend_number

The friend number of the receiving friend for this file.

file_number

The file transfer identifier returned by Tox.file_send.

position

The file or stream position from which to continue reading.

Returns:

true on success.