Skip to content

Commit

Permalink
💡 Update explanation of the timeout as @kuhnroyal suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Nov 26, 2023
1 parent 464cf37 commit 0d5c48a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dio/README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ Duration? sendTimeout;
/// 接收数据的超时设置。
///
/// 这里的超时对应的时间是:
/// - 连接建立和响应的间隔;
/// - 每个 bytes 事件返回的间隔,而不是总体的接收时间
/// - 在建立连接和第一次收到响应数据事件之前的超时。
/// - 每个数据事件传输的间隔时间,而不是接收的总持续时间
///
/// 超时时会抛出类型为 [DioExceptionType.receiveTimeout] 的
/// [DioException]。
Expand Down
7 changes: 4 additions & 3 deletions dio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,10 @@ Duration? sendTimeout;
/// Timeout when receiving data.
///
/// The timeout represents:
/// - the timeout during connection established and responded.
/// - the timeout during data transfer of each bytes event,
/// rather than the overall timing during the receiving.
/// - a timeout before the connection is established
/// and the first received response bytes.
/// - the duration during data transfer of each byte event,
/// rather than the total duration of the receiving.
///
/// Throws the [DioException] with
/// [DioExceptionType.receiveTimeout] type when timed out.
Expand Down
7 changes: 4 additions & 3 deletions dio/lib/src/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,10 @@ class Options {
/// Timeout when receiving data.
///
/// The timeout represents:
/// - the timeout during connection established and responded.
/// - the timeout during data transfer of each bytes event,
/// rather than the overall timing during the receiving.
/// - a timeout before the connection is established
/// and the first received response bytes.
/// - the duration during data transfer of each byte event,
/// rather than the total duration of the receiving.
///
/// Throws the [DioException] with
/// [DioExceptionType.receiveTimeout] type when timed out.
Expand Down

0 comments on commit 0d5c48a

Please sign in to comment.