Skip to content

Commit fe80d7e

Browse files
committed
Improve docs for Mint.HTTP.recv/3
Closes #413.
1 parent 76db5ed commit fe80d7e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/mint/http.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,14 @@ defmodule Mint.HTTP do
855855
856856
This function will raise an error if the socket is in active mode.
857857
858+
> #### Hanging Waiting for Bytes {: .warning}
859+
>
860+
> If `byte_count` is greater than `0` and the socket doesn't receive
861+
> *at least* `byte_count` bytes withing the `timeout`, then the function
862+
> will block for the duration of `timeout` and then return a timeout error.
863+
> This behavior is the same as the `recv` function in [`:gen_tcp`](`:gen_tcp`)
864+
> and [`:ssl`](`:ssl`).
865+
858866
## Examples
859867
860868
{:ok, conn, responses} = Mint.HTTP.recv(conn, 0, 5000)

0 commit comments

Comments
 (0)