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

Improve comments to specify how period is formatted

parent b6705445
No related branches found
No related tags found
2 merge requests!510Release,!376Improve comments to specify how period is formatted
...@@ -268,7 +268,10 @@ func (f *FileTransfer) CloseSend(tidBytes []byte) error { ...@@ -268,7 +268,10 @@ 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 to wait between progress callbacks triggering // - period - duration to wait between progress callbacks triggering,
// formatted as a string containing a decimal number followed by unit
// specification such as "300ms", "-1.5h" or "2h45m".
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte, func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte,
callback FileTransferSentProgressCallback, period string) error { callback FileTransferSentProgressCallback, period string) error {
cb := func(completed bool, arrived, total uint16, cb := func(completed bool, arrived, total uint16,
...@@ -299,7 +302,10 @@ func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte, ...@@ -299,7 +302,10 @@ func (f *FileTransfer) RegisterSentProgressCallback(tidBytes []byte,
// 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 to wait between progress callbacks triggering // - period - duration to wait between progress callbacks triggering,
// formatted as a string containing a decimal number followed by unit
// specification such as "300ms", "-1.5h" or "2h45m".
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
func (f *FileTransfer) RegisterReceivedProgressCallback(tidBytes []byte, func (f *FileTransfer) RegisterReceivedProgressCallback(tidBytes []byte,
callback FileTransferReceiveProgressCallback, period string) error { callback FileTransferReceiveProgressCallback, period string) 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