Skip to content
Snippets Groups Projects
Commit 8e4b163a authored by Jonah Husson's avatar Jonah Husson
Browse files

Additionaly explanation of period value

parent 21cd147c
No related branches found
No related tags found
2 merge requests!510Release,!376Improve comments to specify how period is formatted
...@@ -268,7 +268,9 @@ func (f *FileTransfer) CloseSend(tidBytes []byte) error { ...@@ -268,7 +268,9 @@ func (f *FileTransfer) CloseSend(tidBytes []byte) error {
// Parameters: // Parameters:
// - tidBytes - file transfer ID // - tidBytes - file transfer ID
// - callback - callback that reports file reception progress // - callback - callback that reports file reception progress
// - period - duration (in ms) to wait between progress callbacks triggering // - period - Duration (in ms) to wait between progress callbacks triggering.
// This value should depend on how frequently you want to receive
// updates. Suggested default: 50
func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte, func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte,
callback FileTransferSentProgressCallback, period int) error { callback FileTransferSentProgressCallback, period int) error {
cb := func(completed bool, arrived, total uint16, cb := func(completed bool, arrived, total uint16,
...@@ -297,7 +299,8 @@ func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte, ...@@ -297,7 +299,8 @@ func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte,
// - tidBytes - file transfer ID // - tidBytes - file transfer ID
// - callback - callback that reports file reception progress // - callback - callback that reports file reception progress
// - period - Duration (in ms) to wait between progress callbacks triggering. // - period - Duration (in ms) to wait between progress callbacks triggering.
// Suggested default: 50 // This value should depend on how frequently you want to receive
// updates. Suggested default: 50
func (f *FileTransfer) RegisterReceivedProgressCallback(tidBytes []byte, func (f *FileTransfer) RegisterReceivedProgressCallback(tidBytes []byte,
callback FileTransferReceiveProgressCallback, period int) error { callback FileTransferReceiveProgressCallback, period int) error {
cb := func(completed bool, received, total uint16, cb := func(completed bool, received, total uint16,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment